Hypothetical situation: What would be the long term effects of running sudo chmod -R 777 /? I know that it means that all users have full permissions on all files, but are there any other side-effects?
9561
I was trying to run chmod -R 777 ./ but ended up typing chmod -R 777 / and set 777 on my entire machine. What can go wrong? How can I fix it?
82906
I am root. I would like to know whether a non-root user has write access to some files - thousands of them. How to do it efficiently while avoiding process creation?
46447
My issue is that I've seriously busted all of the owners and permissions on my user folder and subfolders and it's causing lots of issues using lots of applications.  The initial cause was that I had renamed a user by following the Apple support instructions at   After the new user was set up, Mozy backup wouldn't backup any more and lots of my applications couldn't update themselves automatically. The application usually started working again if I deleted the offending program and reinstalled it. I thought it was because the permissions were wrong and I found some places where GetInfo indicated that permissions were referencing the old user. Sometimes the dialog just said "Fetching" for the username and never updated to anything else.   I ran Onyx "fix permissions" and Disk Utility "Repair Permissions" with no results. With "Repair Permissions", it keeps throwing some info warnings about unexpected ACLs, but the info I could find online didn't think those would be causing issues like this.  I tried to recursively run some command line scripts on the user folders (both logged in as root and using sudo). chmod got lots of errors about the owner of the files being wrong. chown after that gave me other errors (I can't remember exactly what they were). In a fit of panic, I right-clicked the entire user folder and chose to apply it's permissions to all children.   From what I can tell, when I did that, I set everything to Read&amp;Write for that user and Read-Only for "everyone" and "staff". Now, I'm worse off than before. Firefox crashed and it can't even update it's own settings so it brings up the "Do you want to restore these tabs" every single time it launches, even after repeatedly saying "Start New Session".  Basically, everything in my user folder is broken with regards to owner and permissions and I need to know what they are supposed to be. Who is the owner of the files in each directory supposed to be (Downloads, Applications, etc.) and what should the permissions be? Given those permissions and owners, what is the best way to go about setting those all right?  I saw a question similar to this at  but it only addresses permissions, not owners, which has been an issue already.  I'm not sure if reinstalling the OS over the copy I have right now would fix anything and I'm close to calling Apple Support if I can't figure anything out in the next few days. Thanks for any help.
54610
Is it possible to edit the sudoers file so a user can use sudo for any command except for a specified one?  I reverse is true, I believe, that the sudoers file can be setup so that a user can only execute a given list of commands.  EDIT: the commands I really want to take away are halt and reboot... this makes me think there are special system calls for halt and reboot.  Can you take system calls away from a user?  If not, is it because the unix permission system abstracts over system calls neglecting this?
23805
What would happen if I delete the / directory while logged as root into Ubuntu?  Would I get some sort of error to the effect of Error: unable to self-destruct? Or would I actually be able to delete the directory?
95249
Is there some permissions setup that would allow a user, say, john, to add a file to a directory d, but not be able to remove an existing file owned by another user, say, root?   My understanding is that this is not possible, since one needs execute permissions to add a file to the directory, but this also gives on the power to unlink any file in the directory.  (I'm using Mac OS 10.9, but this question presumably applies to all POSIX-ish systems.)
109809
In the properties menu of this folder the permission is set to "root" user and group, it shows the message "you are not the owner, so you cannot change these permissions." I am indeed the owner and only user of the machine, how can I change the permissions?
117235
I have created directories in root. I am looking for the chmod command to allow all users read and write permissions to a specific directory. I have done chmod 775 for a file but I need this for a directory. This includes permissions on all files and sub directories.
5541
I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by that group. This is important because I want files to be readable by the webserver (which I will not run as root) but so a user can still put new files in the directory. I can't put the users in www-data because then they can read every other users websites.   I want the webserver to read all websites, I want users to be able to change their own.  The permissions are set like this on the folders at the moment....  drwxr-x--- 3 john www-data 4096 Feb 17 21:27 john   It is standard behavior on BSD for permissions to work this way. How do I get Linux to do this?
16159
I have a rooted device, with superuser rights granted to a few apps I trust. I have often found my /system or /vendor partition mounted read/write, and some files chmoded to 0777. Similarly directories/files with random names are created/deleted (e.g. /sdcard/.a03Degpoif), .nomedia files are created inside them to hide their contents from gallery etc.  logcat/dmesg contains no traces of all this happening in background. This doesn't happen periodically but in a slapdash way, internet connectivity isn't a condition either. I have tried disabling/uninstalling apps, looking for any suspicious processes running, but couldn't identify the culprit(s).  Is there a way to figure out who is doing this?
29398
This question is actually non Ubuntu-specific. My understanding is that sudo is to prevent non-authorized users from doing administrative and other potentially harmful operations. The premise is that someone is here in front of my PC using it... or maybe remotely (but in that case they should know my login password to connect to the computer, and this is usually the same as my sudo password...) So someone is in front of my PC and she cannot delete certain important files or dirs or install harmful software without knowing my sudo password, but she can do a lot of other harmful and privacy-violating things without sudo. So, wouldn't it be better instead asking for admin privileges each time before opening the file manager or the terminal? I know this may be time-consuming and exhausting...
11898
I'm gearing up to deploy a Drupal 7 site and I can't find any documentation about what the recommended security-conscious file and directory permissions should be set to.  Specifically default/files/ (also sub directories?), settings.php, .htaccess and anything else I should be aware of.
36763
I have messed up my sudoers file and I want to change the permission on it.   When I login in recovery mode, I cannot run the command chmod as it is read-only option.  I tried mount -o remount,rw / in recovery mode. Didn't work for me:  Err : Ext4-fs remount. Opts errors=remount-ro    How can I boot into recovery mode and with read-write option?
36394
I stupidly ran sudo chown -R carlos:carlos / and carlos is my user. This changed all files to be Carlos and I could not boot up again (because the root files were now owned by #1000) and I cant get sudo acess in live cd (because the owner of /usr was changed to my user). Can anyone help me? FYI I have mounted my hard drive.
16991
I have a folder in my home directory that I want to be truly shared between all users on the same computer.  So, I set the permission to be 777. Now, all users can access it and can create, ,edit, delete files in it.  However, I do not have write access to files created by other users.  How do I ensure that all files (existing as well as newly created/ copied) have rwx access to all users?
76256
I get error message always when I work with sudo command.  It shows always sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700.   A while ago I changed the permission of /var folder to 777.   How can I fix it?
68969
Despite the fact that I didn't run any chmod or chown commands, I seemed to have lost the ability to cd into some folders in my home directory. So I ran according to various answers on this forum since I have no clue about linux permissions:  sudo chmod -R 666 /home/rasmus/ sudo chown -c rasmus /home/rasmus/ sudo chown rasmus:rasmus /home/rasmus/ chmod 750 /home/rasmus/ sudo chown -R rasmus:rasmus /home/rasmus/ sudo chmod a+rx /home sudo chmod u+w /home   leaving my home dir in this state:  10:57:35: 8𝌆𝌆𝌆D:[~] ls -l total 52 drw-rw-rw- 2 rasmus rasmus 4096 Apr 15 10:43 catkin_ws/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Desktop/ drw-rw-rw- 3 rasmus rasmus 4096 Apr 15 09:31 Documents/ drw-rw-rw- 4 rasmus rasmus 4096 Apr 14 14:55 dotfiles/ drw-rw-rw- 3 rasmus rasmus 4096 Apr 14 15:27 Downloads/ -rw-rw-rw- 1 rasmus rasmus 8980 Apr 14 14:03 examples.desktop drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Music/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Pictures/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Public/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 16:31 Templates/ drw-rw-rw- 2 rasmus rasmus 4096 Apr 14 14:22 Videos/   Apparently, I can read the folders, but not cd into them:  10:58:54: 8𝌆𝌆𝌆D:[~] ls Desktop/ 10:58:58: 8𝌆𝌆𝌆D:[~] cd Desktop/ bash: cd: Desktop/: Permission denied   What do I need to do to fix this?