Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-28-2004, 01:58 AM   #1
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 :


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.

Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-28-2004, 02:03 AM   #2
Registered: Mar 2004
Location: Athens,Greece
Distribution: Debian,Ubuntu
Posts: 181

Rep: Reputation: 32
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...
2 members found this post helpful.
Old 08-28-2004, 02:31 AM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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...
2 members found this post helpful.
Old 08-28-2004, 02:35 AM   #4
Registered: Mar 2004
Location: Athens,Greece
Distribution: Debian,Ubuntu
Posts: 181

Rep: Reputation: 32 bad
Old 08-28-2004, 09:22 AM   #5
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
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.
3 members found this post helpful.


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

All times are GMT -5. The time now is 08:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration