Find the answer to your Linux question:
Results 1 to 3 of 3
Hello Linux enthusiasts, Checking permissions on a file on my server shows this: -rwxrws--- What is the "s" in the second triad? Best wishes, Methodical...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2002
    Posts
    11

    Permissions question


    Hello Linux enthusiasts,

    Checking permissions on a file on my server shows this:
    -rwxrws---

    What is the "s" in the second triad?

    Best wishes,

    Methodical

  2. #2
    Linux Engineer
    Join Date
    Dec 2002
    Location
    New Zealand
    Posts
    766
    im pretty sure its suid. which pretty much means it is accessible by all users

  3. #3
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    SUID means it will run as whoever the owner of the file. Say you have a file owned by root with +s and you are logged in with bobthebuilder, when you run the file, it will execute with root permissions instead of bobthebuilder permissions. Files which are owned by root and +s are very dangerous if poorly coded since they can be exploited to gain root access to your server.

    Code:
    find / -perm -u+s -type f -exec ls -ld {} \;
    That will list all files that are +s on your machine. Some files require +s like su and passwd.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •