SUID permissions?

SUID allows you to apply an "s" bit to a file. Which means anyone executing it, is executing it with superuser privileges. Is this correct?

Say I have /bin/ping

How do I set this with the "s" bit?
Who is Participating?
danny_ebbersConnect With a Mentor Commented:
Hi dissolved,

Not entirely it's executing with the permissions of the owner of the file not necessary superuser privileges

(Will also demonstrate how to set it)

Best regards,
Danny Ebbers
David PiniellaConnect With a Mentor Commented:
#chmod +s /bin/ping
will enable it and
#chmod -s /bin/ping
will disable it.

ls -l will show you the "s" bit in place of the "x" (execute) bit if a file is suid'd.
dissolvedAuthor Commented:
thanks. I understand there is a GUID too? I will post a separate question and link it in here.
dissolvedAuthor Commented:
Here is the new link.
Thanks for any help you two can give
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.