3

Does setting u+s on a directory imply u+x?

5

No, there's a difference ;-)

# ls -l x
-rw-r--r-- 1 root root 0 Jan 27 20:07 x
# chmod u+s x
# ls -l x
-rwSr--r-- 1 root root 0 Jan 27 20:07 x
# chmod u+x x
# ls -l x
-rwsr--r-- 1 root root 0 Jan 27 20:07 x

See, e.g. http://www.linuxnix.com/2011/12/suid-set-suid-linuxunix.html

You see the difference more clearly

  • Capital S: chmod 4655 (no execute)
  • small s: chmod 4755 (execute set)

For when you would need capital S? Good question...

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.