1

I mistakenly changed ownership of all files on a CentOS system from root to my login account. I can login but if I su I get:

su: cannot set groups: Operation not permitted

I don't need the system to be fully functional but I do need to su into it for a few days. Since I can log in and I do have permission to the entire system, it seems like the su function can't write to something with groups. If I change this then it will.

Does anyone know what permissions I need to change?

Tensigh
  • 341
  • 1
    No, su is complaining because the setgroups() call fails (not being run with uid=0). And since this is a security problem, su decides to exit instead. I suggest you to boot a recovery/install media and restore the file ownerships/permissions. – Laszlo Valko Oct 27 '15 at 05:37
  • note also that restoring ownership and/or permissions is almost impossible (i.e. impossible unless you have a complete list of what every file's owner, group, and perms are supposed to be). You may find it faster, easier, and a lot less frustrating to backup your data in e.g. /home and your config files from /etc and re-install from scratch. – cas Oct 27 '15 at 05:53
  • see http://unix.stackexchange.com/questions/12998/wrongly-set-chmod-777-problems – cas Oct 27 '15 at 05:57
  • I wish I could reboot this server. It's at a COLO that doesn't let us have boot level access. Thanks anyway. – Tensigh Oct 27 '15 at 06:25

0 Answers0