Unix/Linux Go Back    

UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

sticky bit in chmod

UNIX for Advanced & Expert Users

Thread Tools Search this Thread Display Modes
Old Unix and Linux 05-21-2005
lavanya lavanya is offline
Registered User
Join Date: May 2005
Last Activity: 24 December 2012, 1:43 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sticky bit in chmod


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.....

Sponsored Links
Old Unix and Linux 05-21-2005
zazzybob's Unix or Linux Image
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
Join Date: Dec 2003
Last Activity: 2 October 2017, 12:19 PM EDT
Location: /dev/null
Posts: 2,187
Thanks: 3
Thanked 25 Times in 23 Posts
You should probably read some basic UNIX tutorials as well as the chmod manual page as you've got the understanding of the sticky bit a little skewed Linux

The sticky bit is set by either chmod'ing 1xxx (where x are your other permission bits), or by using chmod +t

The first octet in chmod is used to set either Set UID, Set GID or Sticky bit, or a combination of some or all of these "special" permissions. Set UID allows an executable to be run with the privilages of the executables owner, Set GID allows an executable to run with the privilages of the group that owns the executable, and traditionally the sticky bit was used to keep an executables image in memory. Nowadays memory is cheap, and the sticky bit only really makes sense when set on a directory (such as /tmp) - this ensures that only the user who creates a file can delete that file.

This is a bit of a brief overview so make sure you read the chmod man page for full details.

Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
What is the difference between chmod in solaris and chmod in Linux? sumaiya UNIX and Linux Applications 1 08-12-2010 08:38 AM
sticky bit udtyuvaraj AIX 1 07-28-2010 01:29 PM
Sticky Bit udtyuvaraj AIX 1 07-16-2010 01:24 PM
sticky bit manu.vmr Shell Programming and Scripting 2 02-02-2007 06:43 AM
Sticky Bit rob11g UNIX for Dummies Questions & Answers 1 03-14-2005 03:51 PM

All times are GMT -4. The time now is 09:52 AM.