Help - Search - Members - Calendar
Full Version: sudo chmod -R 777 /
Linuxhelp > Support > Technical Support
opatrick
Hello, I'm new in that forum and came because of a big mistake I made this morning...
Instead of typing
sudo chmod -R 777 ./
I did
sudo chmod -R 777 /

I stopped the process but some dirs are now 0777:
/etc
/lost+found
/media
/opt
/tmp
/usr
/var

Can someone tell me which dirs must not be 0777 and how can I repair that?

Many many thanks!!!
michaelk
All of them. Except for lost & found the ones listed should be 755 i.e. rwxr-xr-x.
lost & found is 700 rwx------
The -R means recursive so you will also need to change all the subdirectories.
opatrick
QUOTE (michaelk @ Mar 8 2006, 07:14 PM)
All of them. Except for lost & found the ones listed should be 755 i.e. rwxr-xr-x.
lost & found is 700 rwx------
The -R means recursive so you will also need to change all the subdirectories.

Many many thanks!! biggrin.gif
opatrick
QUOTE (michaelk @ Mar 8 2006, 07:14 PM)
All of them. Except for lost & found the ones listed should be 755 i.e. rwxr-xr-x.
lost & found is 700 rwx------
The -R means recursive so you will also need to change all the subdirectories.

By the way, can I safely do
sudo chmod -R 755 /etc
sudo chmod -R 700 /lost+found
sudo chmod -R 755 /media
sudo chmod -R 755 /opt
sudo chmod -R 755 /tmp
sudo chmod -R 755 /usr
sudo chmod -R 755 /var

Many thanks!
michaelk
Unfortunately, not all distributions are the same there might be different subdirectories with different permissions. I can not say that a global chmod will repair everything.
DS2K3
Yikes...

In future, it might be safer to ust use "." instead of "./" (Should ahve the same effect).

You might want less stringent permissions on /tmp - But it varies. Stick with 755 unless you have problems.

D
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.