Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users


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.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-21-2005
Registered User
 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #2  
Old 05-21-2005
zazzybob's Avatar
Registered Geek
 
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,186
Thanks: 3
Thanked 23 Times in 22 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

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.

Cheers
ZB
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:42 AM.