New answers tagged chmod
I was going to simply delete the question since one of the original facts was incorrect. I decided that since the obvious answer was missed and there is an alternative not so obvious answer to post the possible causes and solutions to this problem aid those that may run into a similar issue in the future. 1) If you have this problem and you think that ...
Try using sudo before the chmod command as below and check sudo chmod -R ugo+rw filename If you having issue with the ownership of the file use sudo chown -R new_owner_name file
this to: sudo chmod 777 home/amnesia/Desktop/file this: sudo chmod 777 /home/amnesia/Desktop/file you left a '/' slash better to use will be: sudo chmod 777 ~/Desktop/file
try this find / -type f -perm /111 -print or: find / -type f -executable -print
SOLUTION: I TESTED THIS IN CENTOS This guy saved my job! (You need to access somehow) http://www.adminlinux.org/2009/07/how-to-restore-default-system.html 1) To reset uids and gids on files and directories : for u in $(rpm -qa); do rpm --setugids $u; done 2) To permissions on files and directories for p in $(rpm -qa); do rpm --setperms $p; done then ...
Deletion is a write operation so you need to remove write access from the directory that contains the file (using the file ~/foo/bar.txt as an example): chmod a-w ~/foo/ or chmod 666 ~/foo/ This, however still allows root to delete the file. If don't even want to allow that, things get more complex. As far as I know, the best way (and this is easily ...
As long as you're not trying to keep root from deleting the file, you actually need to modify the permissions on the directory in which ctl_model_fact.csv resides. chmod go-w [your directory] will do it, but it will affect all files in your directory, not just ctl_model_fact.csv. If you also want to make sure other users are unable to change the file, use ...
root can always delete a file (at least on the chmod level; you need file system attributes or a Linux Security Module (SELinux, AppArmor) to prevent that). For ordinary users you have to remove the write permission of the parent directory for all users.
It is possible without being root but you should set SUID for your program. There is 2 way to do it which are exactly same anyway. chmod u+s [program] chmod 4755 [program] You may want to see SETUID Also If you want to handle this in C : You Should check setuid function And If you want to do it in bash : You should check setuid on shell scripts
To give a binary permission to run things as root, you need to set the "sticky bit" on the binary. Normally after compiling, you might see: # ls -l print -rwxr-xr-x 1 mark mark 111 24 Oct 17:32 print Setting the set-uid (sticky) bit can be done using and octal mode, or symbolically (note that you will need "root" privileges in order to change the ...
chown root:root name_of_binary chmod 4755 name_of_binary
Top 50 recent answers are included