SUID permissions?

Posted on 2005-04-12
Last Modified: 2010-04-20
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?
Question by:dissolved
    LVL 4

    Accepted Solution

    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
    LVL 9

    Assisted Solution

    by:David Piniella
    #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.

    Author Comment

    thanks. I understand there is a GUID too? I will post a separate question and link it in here.

    Author Comment

    Here is the new link.
    Thanks for any help you two can give

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now