LinuxQuestions.org
Help answer threads with 0 replies.
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 06-16-2005, 02:37 PM   #1
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
SUID and setting 'other' permission to _ _ x


I'm studying linux and am have difficulty understanding the differences between SUID and setting the "other" permission for a program to execute.

In short, what's the functional difference between the following permission sets for a program file?

rwt rw rw and rwx rw rwx

Thanks gang
 
Old 06-16-2005, 06:55 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Re: SUID and setting 'other' permission to _ _ x

Quote:
Originally posted by hpladd
rwt rw rw and rwx rw rwx
Surely you mean
rwsrw-rw-
?
t means sticky, not SUID.


But to answer the question.

The purpose of SUID is to have the executable run as
the owner, no matter who starts it.

The need for it is obvious when an application has
been compiled to require root privileges (and you
don't want to use sudo) and you want a normal user
to be able to run it, e.g. /sbin/reboot ...

Btw, your rwsrw-rw- wouldn't work, the x still needs
to be there for other.


Cheers,
Tink
 
Old 06-17-2005, 10:57 AM   #3
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
(I posted a reply earlier, but it hasn't shown-up. Also I hit "thanks," but that doesn't seem to have gone well either.)

Thanks Tink,

Surely I did mean s. (I still think s should stand for sticky).

I now see how SUID an SGID are similar.

All the manuals refer to SUID and its use with executables because SUID is of very limited use in any other situation. How often would it be useful to have a user A create a file and have it inherit user B's user ownership? Right?

Also SUID does not provide access to an executable it just provides the permissions to those that do access the file. Therefore if user A needs access to the executable, the "other" permissions must at least be x. But does "other" also need rw, or are those permissions inherited after access to the exe. file is obtained?

Thanks again!
 
Old 06-17-2005, 02:37 PM   #4
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
It's explained in more detail here: http://www.tldp.org/LDP/intro-linux/...ect_04_01.html in paragraph 4.1.6.
 
  


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
Permission setting tkt Linux - Newbie 4 06-08-2005 10:06 PM
Setting permission on hard drive petero Linux - Hardware 1 06-03-2005 02:19 AM
setting up permission dramous Linux - Software 1 10-19-2004 12:44 PM
SUID file drops suid bit on append? c_coder Programming 1 03-12-2004 08:59 AM
Permission setting in RH9 lordgrey.org.uk Linux - Newbie 2 01-21-2004 02:12 PM

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

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