PDA

View Full Version : setgid: operation not permitted



tymlls05
09-17-2006, 11:39 PM
I'm new to linux based systems and more especially the linux commands.

The last time I ran shell I put the command "chown -hR jathenry /". I was hoping to switch all the file owner ship and permissions over to that account.

That didn't work. I ran shell typed "su", typed my password and now it gives me this error:

setgid: operation not permitted

How can i fix this? And also transfer ownership, or share ownership with root with the permissions?


Thanks,

malaire
09-18-2006, 10:33 AM
I'm new to linux based systems and more especially the linux commands.

The last time I ran shell I put the command "chown -hR jathenry /". I was hoping to switch all the file owner ship and permissions over to that account.

If you did that from root-shell, then most likely it DID work, but that was quite stupid thing to do because there are certain system-files which must be owned by root (or one of the other special user-accounts) for the system to work.



That didn't work. I ran shell typed "su", typed my password and now it gives me this error:

setgid: operation not permitted


The reason for this most likely is that after you changed the ownerships, some of the files which "su" needs, now have wrong ownership, and so you can't use "su" anymore.

(As a test I changed the ownership of just two files: /bin/su and /usr/bin/sudo and after that "su" didn't work anymore, even if I got different error than you got)



How can i fix this?

Easiest way to fix this might be to reinstall Linux.

Other way would be to restore all file-ownerships and other things (like setgid/setuid bits) to how they were before you run the "chown -hR jathenry /" command.

Well, at least you now know that there are certain commands which are dangerous when used from root-shell.



And also transfer ownership, or share ownership with root with the permissions?

There are some files for which you must not transfer the ownership for the system to work.

Why did you want to do that?