By Mistake on Ubuntu 9.04 my colleague has changed the permissions to 777 on root directory (/)  whats the best way to recover the permissions ?
8780
This is a  about File Permission and Why 777 is "destructive".   I'm not asking how to fix this problem, as there are a ton of references of that already on Server Fault (reinstall OS). Why does it do anything destructive at all?  If you've ever ran this command you pretty much immediately destroy your operating system. I'm not clear why removing restrictions has any impact on existing processes. For example, if I don't have read access to something and after a quick mistype in the terminal suddenly I now have access well... why does that cause Linux to break?
94476
I experience a strange behaviour in my /tmp directory. Although a user belong to a group has permissions to read/write a file, he cannot do so.  In this example, I create a new file /tmp/test.txt as user max. I give it the 777 permissions and make the file belong to the group root, but user root still cannot edit it.  su max touch /tmp/test.txt chmod 777 /tmp/test.txt  su root chown max:root /tmp/test.txt  # ls -l /tmp/test.txt  -rwxrwxrwx 1 max root 0 26. Feb 12:08 test.txt  # echo "foobar" &gt; /tmp/test.txt bash: /tmp/test.txt: Permission denied   When moving test.txt to a different directory, everything works as expected.  /tmp is a tmpfs mounted via fstab via the following options:  tmpfs       /tmp    tmpfs   nodev,nosuid,size=5G    0 0   When running ls -l /, the tmp folder looks like the following:  drwxrwxrwt  20 root root   640 26. Feb 12:01 tmp/   I am running Manjaro, an Arch Linux derivate.  Did I do something wrong with mounting tmpfs?
4844
I accidentally executed      sudo chmod -R 777 /   I was actually trying to change a specific folder permission recursively, btw i did stop the command before it changed everything.  But now, i can't execute for example      sudo   Every time i try to sudo something it throws me this error:     effective uid is not 0, is sudo installed setuid root?   Btw i know i can use chown -R root:root /usr/bin where sudo is located, but of course i don't have the permissions to do this.  So, how can i revert this process? Or at least save the sudo file without reinstalling everything?  The system is still connected to the internet and seems to work fine besides the sudo issue.  Thanks in advance.
79127
I have two files in a directory. One has correct permissions and the other has not. Is there a way I can "copy" the set of permissions from one file to another?
19274
I use the Disk Utility to repair it. But the permissions change back after reboot.     Permissions differ on “private/etc/aliases”; should be lrwxr-xr-x ;   they are -rwxr-xr-x .    Permissions differ on “Users”; should be drwxr-xr-x ; they are drwxrwxrwx .    Permissions differ on “Users/Shared”; should be drwxrwxrwt ; they are drwxrwxrwx .   System: Mac OS X 10.9.3
31947
I recently typed the command  sudo chmod 777 -R /   after that some things like  sudo -i   are not working normally. So I am wondering if there is any way I could reset the folder permissions to their original state?
47395
Can someone tell me what I'm doing wrong, what this is, or how to fix it? I'm running Fedora 18 and getting the error shown  [root@servername /]# find . -name ngirc find: `./run/user/1000/gvfs': Permission denied [root@servername /]#  [root@thinktank /]# pwd / [root@thinktank /]# ls -ltr ./run/user/1000 ls: cannot access ./run/user/1000/gvfs: Permission denied total 0 d?????????? ? ?    ?      ?            ? gvfs lrwxrwxrwx. 1 root root  17 May 28 12:30 X11-display -&gt; /tmp/.X11-unix/X0 drwx------. 2 kal  kal  120 May 28 12:30 keyring-QjDw4b drwx------. 2 kal  kal   40 May 28 12:30 gvfs-burn drwx------. 2 kal  kal   60 May 28 12:30 krb5cc_5f0bcaf94f916d6b61696e2251a4dbb3 drwx------. 2 kal  kal   60 May 28 18:25 dconf
93918
I love Linux and everything she stands for; however, unfortunately I grew up with Windows. Thusly so I have learned very bad practices (such as NT Authority will protect me). I have several Linux VPS's for personal and educational uses and I manage all of them from the command line. Through the management of these servers I have learned very painful lessons of the power of the Root user. Such as:   rm -d -R /* chown www-user:www-user -R /* Etc.    I've only removed my root directory twice, but just last week I changed the permission of the whole drive - effectively locking the Root out.   Now I know that I should never be logged in as Root, but most of the time I have to deal with files that only the Root owns so I sudo and run the command.   So my question is, is there a way to prompt the user (who is root, or sudo'ed) when a potentially hazardous command is executed, so the user may rethink their decision? Possibly through scripts in Bash, or a different sudo wrapper.   Or (I ask this hopefully, and very simplified) is there a way to set up permissions where instead of a two tier user system (Root user, regular user) there is a three tier system like in Windows (NT Authority, Administrator, other User). Basically is there a way to keep the ability of System administration, but restrict access to some system files.
46409
I've been assigned to lock down all /var/log files so that they cannot be read except by the root user.  I've been stumped by the /var/log/boot.log file.  It seems that after every boot the file no matter what what previous permission state gets set to 644 permissions.   I've gone through the exercise of changing the umask in a number of key /etc/init.d files and functions to no avail.  Anybody got any idea as to the specific program doing this and maybe how to get the perms on /var/log/boot.log to be 600?
39194
Normal users can chmod files to make them unaccessible like  evgeniy@ubuntu:~$ touch test evgeniy@ubuntu:~$ chmod 444 test evgeniy@ubuntu:~$ echo 'test' &gt; test bash: test: Permission denied   Can something like this be simulated for the root user?
49449
My user account on Windows 7 is part of the Administrators group which has a full control permissions on C:\inetpub\wwwroot:    However, when I try to create a folder in it, I get the "access denied" error. This is fixed by adding my specific user account to the list but that shouldn't be necessary should it?
59867
If I run:  sudo chown -R user:user /   Can I revert it to what it was before I ran it?
120288
I'm a systems admin for a company and was thrown into a horribly configured server. In the midst of my refactoring I was adding users to my /etc/sudoers file. I seem to have accidentally removed my server admin account from the sudoers file access.  I know what I did wrong (i accidentally commented out the %admin line) question being, how can I reinstate my server admin access in the file without having to restart anything.   Here's how it looks right now:  ## ## User privilege specification ## root ALL=(ALL) ALL #%admin  ALL=(ALL) ALL %superuser ALL=(ALL) ALL "user1" ALL=(ALL) ALL "user2" ALL=(ALL) ALL   Also note that my users do not have permission for sudo for some reason:  Realtor-Station-3-27:~ user1$ sudo -i  WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo. Type "man sudo" for more information.  To proceed, enter your password, or type Ctrl-C to abort.  Password: user1 is not in the sudoers file.  This incident will be reported. Realtor-Station-3-27:~ user1$
27663
I just ran this a few seconds ago. I managed to do Ctrl - C as soon as I realized what I started doing.  So far the only directory it's started going through is /bin.  I'm afraid to do anything else. So far I realized I can't use su as my normal user anymore.  Luckily I still have another root terminal open. What do I do?
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.
3428
I am getting sudo errors, how do I fix this error?  sudo: /etc/sudoers is mode 0777, should be 0440 sudo: no valid sudoers sources found, quitting
86842
I want to have a root privileges on some directories. How can I do this?