LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-08-2008, 09:00 PM   #1
Paris Heng
Member
 
Registered: Jul 2007
Location: Kuala Lumpur, Malaysia
Distribution: Ubuntu 8.04, Solaris 10
Posts: 198

Rep: Reputation: 30
SGID and SUID


Can somebody explain to me the different between the terms SGID and SUID/Sticky Bit? I having problem in understanding the usage of this two parameters.
 
Old 11-08-2008, 09:16 PM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 452

Rep: Reputation: 68
you may find this useful: http://www.linuxquestions.org/questi...d-sgid-258719/
and this:
http://www.linuxquestions.org/linux/...le_Permissions


if you still have questions, please, let me know
 
Old 11-08-2008, 09:45 PM   #3
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,263

Rep: Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562
There is a difference between suid and the sticky bit. There are three bits in addition to rwx bits; sticky, suid & sgid. They have different meanings for files then for directories. The sticky bit used to retain a program in core memory, back when computers had small amounts of magnetic core memory. This use is obsolete but the alternate use for directories is still used. The name refers to the old usage to get programs to stick around in memory after being run. The sticky bit is used for directories to protect files from being deleted by non-owners. The suid bit isn't honored for scripts in Linux but is on some Unixes. The suid bit isn't honored for directories. On some Unix versions, a file created in an suid directory will inherit the directories owner. Linux does honor the sgid bit on directories. A file created in a sgid directory will inherit the group ownership of the directory.

An suid program will run as the owner of the program. An sgid program will run with the effective gid being that as the group owner of the program.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUID and SGID ? Why don't they work ? tungvs Linux - Newbie 17 09-01-2008 06:36 PM
which suid sgid to unset? hank43 Linux - Security 1 10-09-2006 01:46 AM
suid on directory - doesn't, sgid ok? pingu Linux - Security 1 01-18-2006 04:04 PM
suid/sgid question plan9 Linux - Security 1 07-08-2004 07:15 AM
SGID and SUID on Directories mikeyt_333 Linux - General 1 03-26-2002 02:41 PM


All times are GMT -5. The time now is 11:58 PM.

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
Open Source Consulting | Domain Registration