LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-17-2002, 04:14 PM   #1
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Rep: Reputation: 30
How do I check the SUID bit?


set/unset it?

Last edited by WeNdeL; 12-17-2002 at 04:25 PM.
 
Old 12-17-2002, 04:33 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
To find 'em: "find / -perm -4000", then "chmod -s <filename>".
Don't wrap it up like "find / -perm -4000 | xargs chmod -s" because some binaries (like passwd) actually need the bit.
 
Old 12-18-2002, 09:22 AM   #3
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
so what does that extra most significant digit do?

I messed around with chmod last night and this is what I got:

chmod 4000 somefile

gave me ---S------

chmod 2000 somefile

gave gave me -----S------

chmod 1000 somefile

gave me ---------T

what is this?

what exactly does setting the SUID bit do?

I am using Rh 7.2 and 8.0 and the man page for chmod doesn't include the "-s" flag...

can someone further explain this?
 
Old 12-18-2002, 03:37 PM   #4
WeNdeL
Member
 
Registered: Oct 2002
Location: At my desk...
Distribution: RedHat, Fedora, Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
*bump*

Last edited by WeNdeL; 12-19-2002 at 11:42 AM.
 
Old 12-20-2002, 02:02 AM   #5
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 48
man chmod, the description's in the first few paragraphs.

The syntax for chmod looks a bit different from your typical UNIX
command, but isn't really that different. the "-s" "flag" is really a
mode, not an option (or flag).

The set (U/G)ID bit (S) is different from the sticky bit (T), and both
are explained in the first paragraphs on the man page.
 
  


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
suid bit on an executable is ignored during boot process. rob_of_ownsboro Linux - General 3 11-22-2005 01:34 PM
SUID bit on executables doesn't work?! Silverjam Linux - Security 7 11-02-2004 10:10 PM
Suid bit behavior winsnomore Linux - Software 1 05-30-2004 04:49 PM
problem with SUID bit joanq Linux - Newbie 6 04-09-2004 03:56 PM
SUID file drops suid bit on append? c_coder Programming 1 03-12-2004 08:59 AM


All times are GMT -5. The time now is 02:28 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