Really need to know what Operating System and version you are running because the meaning of what used to be known as the "sticky bit" has changed in modern O/S.
There is no unix command called "setuid" - it is a system call in the "C" programming language. There is however an explanation of the sticky bit in "man chmod".
There are unix command called "chmod" and "chown" and there are also system calls called "chmod" and "chown" in the "C" programming language.
Not sure whether you are looking from the point of view of a writing "C" programs or some other angle.
I have a questions, whose answer may be very obvious:
Of what use is the sticky-bit permission on a Unix system?
I have looked at the chmod(1) man page on our HP-UX playground
system, and haven't been given much explanation:
Add or delete the save-text-image-on-file-
execution (sticky... (3 Replies)
I have a script that I want to be able to let user 'wcs1234' execute it, but when it runs, it will do so under the higher authority of 'cdunix'. It is my understanding that I accomplish this with a sticky bit. I have tried every variation of this but am unable to get this to work.
my script is... (2 Replies)
I have a binary. It is having the following permissions
rws rws rwx mqm:mqm runmqtrm
The same program on another machine is
rws rws rwx root: mqm runmqtrm
This program is a setuid program.
This is what my understanding is. Whatever user the program is started under, it will finally be... (0 Replies)
I have the sticky bit set on my /tmp directory, but users are still able to remove files that are not owned by them. Does the /etc/group file get invloved in securing these files ?? (1 Reply)
Hi ,
I am having file permision as
drwxrwsr_x
I kwo for deleting a file in the diretory i need w permsion as well ..
Say if i am having the permsion as
drwxrwsrwx - wil any one can delete the files in the directory ..
And one more question what is the s doing there ..... (2 Replies)
HI
What is sticky bit?
how can be see if the sticky bit for file is set?
WHat is meaning of sticky bit set on Directory?
What is the syntax to set the sticky bit? With example
Thanks (10 Replies)
I want a file I create to not be deletable by other users so I created a sticky bit by chmod 1644 on the file. chown'd it to root and then tried to delete (via GUI drag to trash and empty) as a non root user and it let me. is sticky bit only good for terminal deletes or something? (4 Replies)
as far as i understand, if sticky bit is set on a directory, the files created under tht directory cannot be deleted by ordinary user...
but we can do ths by permission itself,,, tht's assign only read permission to tht dirrectory
wht 's the difference? (1 Reply)
Just learning about the privilege escalation method provided by setuid. Correct me if I am wrong but what it does is change the uid of the current process to whatever uid I set. Right ?
So what stops me from writing my own C program and calling setuid(0) within it and gaining root privileges ?
... (2 Replies)
Discussion started by: sreyan32
2 Replies
LEARN ABOUT BSD
sticky
STICKY(8) System Manager's Manual STICKY(8)NAME
sticky - persistent text and append-only directories
DESCRIPTION
The sticky bit (file mode bit 01000, see chmod(2)) is used to indicate special treatment for certain executable files and directories.
STICKY TEXT EXECUTABLE FILES
While the `sticky bit' is set on a sharable executable file, the text of that file will not be removed from the system swap area. Thus the
file does not have to be fetched from the file system upon each execution. Shareable text segments are normally placed in a least-fre-
quently-used cache after use, and thus the `sticky bit' has little effect on commonly-used text images.
Sharable executable files are made by the -n and -z options of ld(1).
Only the super-user can set the sticky bit on a sharable executable file.
STICKY DIRECTORIES
A directory whose `sticky bit' is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is
restricted. A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and
the user is the owner of the file, the owner of the directory, or the super-user. This feature is usefully applied to directories such as
/tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each others' files.
Any user may create a sticky directory. See chmod(1) for details about modifying file modes.
BUGS
Since the text areas of sticky text executables are stashed in the swap area, abuse of the feature can cause a system to run out of swap.
Neither open(2) nor mkdir(2) will create a file with the sticky bit set.
4th Berkeley Distribution May 26, 1986 STICKY(8)