LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-28-2004, 02:58 AM   #1
Linux_interest
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Rep: Reputation: 0
what is "S" instead of "X" in the file permission when i look at /usr/bin/chsh?


I was looking at program /usr/bin/chsh, and found that the word "S" instead of "X" on the permission :

-RWS--X--X

Wondering, what was this "S"?

Also, i was practising a few command: I got a root user, and two general users which i created, ie. player1 and player2, both in the same group.

Now, i want to make player1 as the root person too, that is a superuser, so i know the user id of the super user is 0. I was wanting to know the command for changing this? After this, i want to change again the uid and gid of player1 to that of player2. Please help me in my these three quries, as i am really new and fresh to Linux.

Awaiting reply from some one.

Cheers
Cherish
 
Old 08-28-2004, 03:03 AM   #2
or1onas
Member
 
Registered: Mar 2004
Location: Athens,Greece
Distribution: Debian,Ubuntu
Posts: 181

Rep: Reputation: 31
s instead of x in the owner permissions means that the 'sticky bit' (suid) is enabled, so this file will be executed with root permissions by all users...
 
1 members found this post helpful.
Old 08-28-2004, 03:31 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,158

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Actually, the setuid bit is not the same as the sticky bit. The sticky bit is a t instead of an x in the other permissions (e.g. for /tmp). The setuid bit is as or1onas says, while the sticky bit set on a directory implies users may only rm files in that directory if they own them (a handy thing for /tmp). On older Unices, the sticky bit caused the system to keep the program's text segment in memory, but on modern systems with modern memory handling this is no longer necessary.

Sorry -- I had to pick a nit...
 
1 members found this post helpful.
Old 08-28-2004, 03:35 AM   #4
or1onas
Member
 
Registered: Mar 2004
Location: Athens,Greece
Distribution: Debian,Ubuntu
Posts: 181

Rep: Reputation: 31
correct...my bad
 
Old 08-28-2004, 10:22 AM   #5
amfoster
Member
 
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 34
Just to go a bit further...

chmod 4777 filename will change the mode to rwsrwxrwx You can run a simple find / -perm +4000 to get a list of all the suid files. You will notice a lot of network applications since root does all network related tasks.

chmod 2777 directoryname will set the sgid. If I have a dir named share and it is owned by root and owned by a group named buddies, then when the sgid bit is set on that directory, any file created or placed in that directory will be owned by the buddies group regardless of who put the file in there.

btmiller described the stickybit perfectly.
 
1 members found this post helpful.
  


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
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 05:51 AM
"accidently deleted every program in /usr/bin that begins with the letter m*" behmjoe Linux From Scratch 1 04-15-2005 09:42 AM
invalid binary "/usr/bin/postgres" while running postgresql ukrainet Linux - Newbie 1 12-01-2004 09:36 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-29-2004 12:33 AM
Error in man command "sh: line 1: /usr/bin/gtbl: No such file or directory" MinA Slackware 1 09-06-2004 07:36 PM


All times are GMT -5. The time now is 01:14 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration