简体   繁体   中英

Why having 777 permissions in root folder doesn't allow me to login?

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?

A blanket 777 causes side effects because:

  1. Certain programs are very picky about file permissions for security, as you suspected.
  2. Certain programs rely on setuid / setgid /sticky bits which get wiped out by 777 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM