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)
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)
Hi,
I understand the purpose of sticky bit on directories. But I am not very clear about what the sticky bit do on a file.
Can any one explain me in detail and with example please.
Thanks in advance. (1 Reply)
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)
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
I am a new Linux user, just successfully passed another exam on unixacademy.com (congratulate me ;) but there was a question I'm uncomfortable with. I mean, I'm not sure how it works and have no idea how to verify it.
What effect sticky bit has on files? I know how it works on directories, but... (6 Replies)
Dear Members,
I have a list of xml files like
abc.xml.table
prq.xml.table
...
..
.
in a txt file.
Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file.
Please help me with the script or command to do so.
... (11 Replies)
Discussion started by: Yoodit
11 Replies
LEARN ABOUT NETBSD
sticky
STICKY(7) BSD Miscellaneous Information Manual STICKY(7)NAME
sticky -- Description of the `sticky' (S_ISVTX) bit functionality
DESCRIPTION
A special file mode, called the sticky bit (mode S_ISVTX), is used to indicate special treatment for directories. See chmod(2) or the file
/usr/include/sys/stat.h
Sticky files
For regular files, the use of mode S_ISVTX is reserved and can be set only by the super-user. NetBSD does not currently treat regular files
that have the sticky bit set specially, but this behavior might change in the future.
Sticky directories
A directory whose ``sticky bit'' is set becomes 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.
HISTORY
The sticky bit first appeared in V7, and this manual page appeared in section 8. Its initial use was to mark sharable executables that were
frequently used so that they would stay in swap after the process exited. Sharable executables were compiled in a special way so their text
and read-only data could be shared amongst processes. vi(1) and sh(1) were such executables. This is where the term ``sticky'' comes from -
the program would stick around in swap, and it would not have to be fetched again from the file system. Of course as long as there was a
copy in the swap area, the file was marked busy so it could not be overwritten. On V7 this meant that the file could not be removed either,
because busy executables could not be removed, but this restriction was lifted in BSD releases.
To replace such executables was a cumbersome process. One had first to remove the sticky bit, then execute the binary so that the copy from
swap was flushed, overwrite the executable, and finally reset the sticky bit.
Later, on SunOS 4, the sticky bit got an additional meaning for files that had the bit set and were not executable: read and write operations
from and to those files would go directly to the disk and bypass the buffer cache. This was typically used on swap files for NFS clients on
an NFS server, so that swap I/O generated by the clients on the servers would not evict useful data from the server's buffer cache.
BUGS
Neither open(2) nor mkdir(2) will create a file with the sticky bit set.
BSD May 10, 2011 BSD