LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-18-2006, 12:49 AM   #1
tofee
Member
 
Registered: Mar 2006
Posts: 41

Rep: Reputation: 15
How does Sticky Bit work ?


Hello ,

Can anyone pls tell me how Sticky bit, SUID and SGID works ? It'd be appreciated if anyone can explain those in detail with example....

thanks in advance..
 
Old 03-18-2006, 02:59 AM   #2
rajtendulkar
Member
 
Registered: Mar 2006
Posts: 34

Rep: Reputation: 15
I copied this extract from man chmod

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.
 
Old 03-18-2006, 03:55 AM   #3
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 48
and for the other ones,

setuid/setgid on an executable file:
when you run the file, it runs with the privileges of the user/group that owns the file, instead of yours

setuid/setgid on a directory:
when you create a new file or subdirectory in the directory, they will be owned by the user/group that owns the directory, instead of yours
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sticky Bit Doesn't Seem to work krishvij Linux - Newbie 5 05-10-2005 05:31 PM
Losing sticky bit privilege when using fork() jones507 Programming 1 11-13-2003 03:57 PM
Sticky Bit tarballed Linux - General 4 07-03-2002 03:54 PM
Sticky bit question...need help rootlinux Linux - General 1 01-26-2002 05:12 PM
sticky bit motiram Linux - General 1 08-01-2001 12:34 PM


All times are GMT -5. The time now is 07:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration