After executing $ sudo chmod 660 /, I can't login with any of the users besides root. How can I restore the permissions ?
Asked
Active
Viewed 1,507 times
1
magor
- 3,592
- 2
- 11
- 27
Ярина Фостяк
- 11
- 2
-
have you tried to change it back with `chmod 750 /` while being logged in as `root` ? – magor Jun 01 '16 at 19:54
-
related: [wrongly set chmod 777 /](http://unix.stackexchange.com/questions/12998/wrongly-set-chmod-777-problems) – John Militer Jun 01 '16 at 22:31
2 Answers
5
As root
chmod 755 /
restores that to the default permissions. If you'd done
chmod -R 664 /
then you'd have to reinstall.
Thomas Dickey
- 75,040
- 9
- 171
- 268
-
even if you did `chmod -R 664 /` you could avoid the full re-installation,e.g. on rpm-based system you could verify the file modes with `rpm -V` – Serge Jun 01 '16 at 21:41
-
1
0
Have you tried chkperm utility?
https://gitlab.com/chkperm/chkperm/wikis/home
I think you can use it on fresh linux installation to get the correct permission, then boot your server into recovery mode and use chkperm to fix these permissions to the original state.
Kristian Kirilov
- 106
- 3