LinuxQuestions.org
Review your favorite Linux distribution.
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-23-2006, 04:07 AM   #1
tofee
Member
 
Registered: Mar 2006
Posts: 41

Rep: Reputation: 15
Significance/reason of using SUID, SGIDand Sticky bit ?


hi there,

what is the reason/significance of using SUID, SGID and Sticky Bit ? the concept is not clear to me.

can anyone pls make me understand the concept of using those ?( if possible..with example ?)


thanx..
 
Old 03-23-2006, 04:47 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
An example of a program that has the SUID bit set is "passwd". This allows a user to change their own password, which is stored in a file that is only writable by root.

The sticky bit is set on world writable directories. It prevents a user from deleting a file that they don't own.
The directory itself is a file, and since the directory is world writable, a user would otherwise be able to delete the file. An example is the /tmp directory.

ls /tmp -l -d
drwxrwxrwt 31 root root 1200 2006-03-23 04:37 /tmp

SGID programs will make your effective gid the same as the program. It is more usefull in a multiuser environment to allow access to files by all members of a group.

Last edited by jschiwal; 03-23-2006 at 04:53 AM.
 
Old 08-22-2012, 04:32 AM   #3
Techsystemquery
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Rep: Reputation: 0
Toffe,

This link have explanation SUID, SGID and Sticky bit with examples. hope it helps you.

http://www.expertslogin.com/linux-ad...bit-suid-guid/
 
Old 08-22-2012, 06:56 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
I use SUID for "halt" and "reboot" so I don't need sudo before them.
 
  


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
what is "sticky bit mode" , "SUID" , "SGID" augustus123 Linux - General 10 08-03-2012 04:40 AM
Suid bit behavior winsnomore Linux - Software 1 05-30-2004 03:49 PM
SUID file drops suid bit on append? c_coder Programming 1 03-12-2004 07:59 AM
Sticky Bit tarballed Linux - General 4 07-03-2002 03:54 PM
sticky bit motiram Linux - General 1 08-01-2001 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration