Penguin smashing windows

Welcome to the Ormond Beach Linux User's Group

There are no meetings yet.

Articles

SetUID and SetGID

I suppose there might be an occassion that you want a command to execute with the premissions of the owner of the program versus the permissions of the executer of the program. I can't imagine a secnario for that at present. Infact it strikes me as dangerous. SetUID causes the program to run with the program owner's permissions and SetGID causes it to run with the group's permissions. To do it you use chmod. Here is an example for SetUID:

chmod 4755 /bin/ls

Here is an example for SetGID:

chmod 2755 /bin/ls

To reverse this, simply run chmod again without the "4" or the "2", depending on which one you need to undo.

Made March 08, 2024 00:34:48.
by John D. Marks
john@ormondbeachlinux.com