I’m working on a program that needs to store some information and I’ve decided to use a simple file for it. When the program starts it executes the following code, which should result in a file opened in append mode if it exists, or created if it doesn’t (The first time the program loads it …
Tag: permissions
Getting ‘Insufficient rights’ and ‘userhelper must be setuid root’ error/warning while using consolehelper
‘/usr/bin/myapp’ is a link to ‘/usr/bin/consolehelper’. When non-root user try to run ‘/usr/bin/myapp’ on command prompt, it shows ‘userhelper must be setuid root’. But running with ‘sudo /usr/bin/myapp’ it works fine. While using with GUI, it shows …
`gcloud compute copy-files`: permission denied when copying files
I’m having a hard time copying files over to my Google Compute Engine. I am using an Ubuntu server on Google Compute Engine. I’m doing this from my OS X terminal and I am already authorized using gcloud. Answer insert root@ before the instance name:
Potential issues of chmod 777 on a directory?
Assuming that I have this directory structure: /tmp/mysockets/appname/ What are the security drawbacks to doing chmod 777 on /tmp/mysockets/? Could another user delete or mess with the reference to the appname/ directory? What I want to do is allow other users to add their own directories to /tmp/mysockets/ b…
Unable to configure folder permissions in Ubuntu
I found many related questions and tried to solve the issue but I was not successful. Actually I created an user named “amit” and assigned the group “www-data”. I gave permission to the folder using this method Change folder and file permission recursively: To change all the directorie…
linux how to allow user to read/write/delete files created from root in a specific folder
I use automysqlbackup to backup my mysql database. The problem is I can only run this program using sudo automysqlbackup. This program dumps the backup into my folder /home/user/backup but theses files are owned by root and when I connect via ftp to this folder I cannot delete or read them. Is it possible tha…
Unable to run compiled files – bash: ./a.out: Permission denied. (I’ve tried chmod)
I’ve compiled my C source using cc test.c, and it did generate a.out file. However when I run it I get this error – My source is not in the home directory, it is on different FAT-32 partition, so I’ve mounted the drive in which the code is using the following command – Then I compile m…
Change file owner group under Linux with java.nio.Files
I have a Linux server and I’m running an image resize job in Java for multiple websites on my server. The website files are owned by different OS users/groups. Newly created thumbnails/previews are owned by the user running the resize job. Now I was googleing around how to change the file owner of newly…
Editing the sudoers file on Mac or Linux when you have no permissions
I’m trying to install something on my MacOS (or Linux) system and I don’t have permission because I’m not the admin. So I tried using sudo and it says that I’m not in /etc/sudoers file. I’ve tried editing the sudoers file but it won’t let me, so I “googled” it. …
What does “visudo: Warning: Cmnd_Alias `NOPASSWD’ referenced but not defined,” mean?
I am editing the file sudoer using the visudo command. When I am done saving the file this warning appears. I am not able to remotely execute a particular file as a non root user. I think this warning might have something to do with it. How do I resolve this warning? EDIT: It is actually NOPASSWD Answer Like …