Quote:
Originally Posted by
kkalyan
Can anyone explain me difference between setuid and sticky bit?
It's the same bit. It just has different meanings in different places.
I don't think it means anything for an ordinary file.
For an executable file, it runs the program as the file's owner -- it sets the UID with the setuid() call,, hence you sometimes hear it called "setuid bit". setuid doesn't work for shell scripts.
For a library file, it means 'remember the contents of this file in swap space', a performance tweak to keep busy libraries closer to memory. Many systems don't honor this anymore.
For directories, it means "only a file's owner is allowed to delete files in this directory". The usual behavior is that anyone with write-permissions can delete files.
Quote:
and also between setuid and chown?
setuid is a flag. chown is a program.