Issue
A friend of mine ran chmod 777 -R /
on her Arch linux and then she was unable to login through tty. Login was incorrect with her user or with root. She was able to mount the partition on the live usb, chroot and change root permissions to 755. That fixed it but I was wondering why 777 would cause it not to work since she should in theory have permission to do anything. Is it some sort of safety measure because, obviously, 777 is not safe?
Solution
A blanket 777
causes side effects because:
- Certain programs are very picky about file permissions for security, as you suspected.
- Certain programs rely on
setuid
/setgid
/sticky bits which get wiped out by777
.
Even if the system is back to a somewhat usable state now, it's probably good idea to just reinstall instead of meticulously restoring the proper bits everywhere.
Answered By - tdy