Sponsored Content
Full Discussion: sticky bit in chmod
Top Forums UNIX for Advanced & Expert Users sticky bit in chmod Post 72525 by lavanya on Saturday 21st of May 2005 01:14:04 AM
Old 05-21-2005
sticky bit in chmod

Hello

The command "chmod 1777 filename" is a user sticky bit which allows only the user to have write access.
In the same way there are 1 to 7 sticky bit values in which the bits 1777, 3777, 5777 , 7777 allow only the owner to have all the permissions where as the even numbered sticky bits(2777, 4777, 6777) allow all(owner, group, others) to have write access.
Can anyone please help me how the group and other sticky bits work correctly.....

Thanks
Lavanya
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sticky bit

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)
Discussion started by: LivinFree
3 Replies

2. UNIX for Dummies Questions & Answers

sticky bit??

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)
Discussion started by: hedrict
2 Replies

3. UNIX for Dummies Questions & Answers

sticky bit

What command string would you use to set the sticky bit on a directory that you own? (2 Replies)
Discussion started by: mma_buc_98
2 Replies

4. UNIX for Dummies Questions & Answers

Sticky Bit

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)
Discussion started by: rob11g
1 Replies

5. Shell Programming and Scripting

sticky bit

Hi frns, What is command to list out all dir's for which sticky bit has been set. Regards, Manu (2 Replies)
Discussion started by: manu.vmr
2 Replies

6. UNIX for Dummies Questions & Answers

Question regarding permision and seguid bit (sticky bit)

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)
Discussion started by: arunkumar_mca
2 Replies

7. UNIX for Advanced & Expert Users

sticky bit

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)
Discussion started by: praveen_b744
1 Replies

8. Shell Programming and Scripting

Sticky Bit

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)
Discussion started by: glev2005
4 Replies

9. AIX

Sticky Bit

What is sticky bit ...and where we aill use this.. how to set this bit in files and directories (1 Reply)
Discussion started by: udtyuvaraj
1 Replies

10. AIX

sticky bit

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)
Discussion started by: udtyuvaraj
1 Replies
CHMOD(1)								FSF								  CHMOD(1)

NAME
chmod - change file access permissions SYNOPSIS
chmod [OPTION]... MODE[,MODE]... FILE... chmod [OPTION]... OCTAL-MODE FILE... chmod [OPTION]... --reference=RFILE FILE... DESCRIPTION
This manual page documents the GNU version of chmod. chmod changes the permissions of each given file according to mode, which can be either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new permissions. The format of a symbolic mode is `[ugoa...][[+-=][rwxXstugo...]...][,...]'. Multiple symbolic operations can be given, separated by com- mas. A combination of the letters `ugoa' controls which users' access to the file will be changed: the user who owns it (u), other users in the file's group (g), other users not in the file's group (o), or all users (a). If none of these are given, the effect is as if `a' were given, but bits that are set in the umask are not affected. The operator `+' causes the permissions selected to be added to the existing permissions of each file; `-' causes them to be removed; and `=' causes them to be the only permissions that the file has. The letters `rwxXstugo' select the new permissions for the affected users: read (r), write (w), execute (or access for directories) (x), execute only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s), sticky (t), the permissions granted to the user who owns the file (u), the permissions granted to other users who are members of the file's group (g), and the permissions granted to users that are in neither of the two preceding categories (o). A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Any omitted digits are assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and sticky (1) attributes. The second digit selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third selects permissions for other users in the file's group, with the same values; and the fourth for other users not in the file's group, with the same values. chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permis- sions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals. STICKY FILES
On older Unix systems, the sticky bit caused executable files to be hoarded in swap space. This feature is not useful on modern VM sys- tems, and the Linux kernel ignores the sticky bit on files. Other kernels may use the sticky bit on files for system-defined purposes. On some systems, only the superuser can set the sticky bit on files. STICKY DIRECTORIES
When the sticky bit is set on a directory, files in that directory may be unlinked or renamed only by root or their owner. Without the sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on directories, such as /tmp, that are world-writable. OPTIONS
Change the mode of each FILE to MODE. -c, --changes like verbose but report only when a change is made -f, --silent, --quiet suppress most error messages -v, --verbose output a diagnostic for every file processed --reference=RFILE use RFILE's mode instead of MODE values -R, --recursive change files and directories recursively --help display this help and exit --version output version information and exit Each MODE is one or more of the letters ugoa, one of the symbols +-= and one or more of the letters rwxXstugo. AUTHOR
Written by David MacKenzie. REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>. COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
The full documentation for chmod is maintained as a Texinfo manual. If the info and chmod programs are properly installed at your site, the command info chmod should give you access to the complete manual. chmod (coreutils) 4.5.3 February 2003 CHMOD(1)
All times are GMT -4. The time now is 03:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy