I'm having a bit of a problem with the suid and sgid feature in a directory. I read somewhere that
When [the suid bit is] set on a directory, all the files and directories created within this directory will have the same owner as the SUID-directory itself, no matter who created the file.
But it does not seem to be working
chmod u+s /tmp/abc
ls -ld /tmp/abc
drwsrwxrwx 2 arun arun 4096 May 29 20:14 /tmp/abc
But when a user 'tom' go to the directory /tmp/abc, and create a file.
ls -l 1.txt
-rw_rw_r__ 1 tom tom 0 May 29 20.24 1.txt
As you can see, the new file is owned by tom instead of arun. Please help ...