LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-15-2006, 07:55 PM   #1
JAKK
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 92

Rep: Reputation: 15
Set group id,set user id?


Hi. I'm learning linux and decided to go with Slackware(I'm having a much more enjoyable time with it then I did a year ago trying to learn Fedora Core). I'm reading the slack book and so far I have had no problem understanding it. However, when I got to the section about permissions I became a bit confused. I understand how permissions work,the number and letter system,and how to set them,but I do not understand the set user id and set group id options. I'm not exactly sure what they do,and I was wondering if someone would mind explaning them. The sites I googled didn't help me much,either. For example,what would typing chmod 6755 do? Thanks for your help.
 
Old 06-15-2006, 08:38 PM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 447

Rep: Reputation: 39
For files:
setuid: When executed the program will run as if the user who owns the file was running it
setgid: When executed the program will run as if it were a member of the file's group

For Directories:
setuid: No effect
setgid: When a new file is created in the directory, the new file will have the same group owner as the directory

Didn't ask about stickys so i assume you know about them

as for chmod 6755 you say you understand the number system for setting permissions so you understand that a regular chmod 755 would set permissions to rwx,r-x,r-x.

The fouth (first in line) bit works in a similar fashion

4000 is the setuid permission

2000 is the setgid permission

1000 is the sticky permission

therefore 6755 sets permissions to rws,r-s,r-x i.e. regular 755 permissions with the extended setuid and setgid permissions.


phew...now i feel less guilty about saying the following...

Quote:
The sites I googled didn't help me much,either
Bollocks. You didn't look very far
 
Old 06-15-2006, 08:43 PM   #3
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
or try `man chmod`
 
Old 06-15-2006, 10:16 PM   #4
JAKK
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 92

Original Poster
Rep: Reputation: 15
Hi. I guess I just needed it explained a bit better,I understand it now. Thanks for your help.
 
  


Reply



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
How to set the permissions for a user Group? Akhran Linux - Newbie 6 11-14-2005 07:55 AM
strange group and user set to "573" in linux-2.4.27 tree structure xround Linux - General 2 10-12-2004 11:09 AM
How to set the default group for a new user in SuSE. jschiwal Linux - Distributions 1 07-24-2004 11:25 PM
How to view set-user-ID and set-group-ID Xris718 Linux - General 7 01-10-2004 01:44 PM
[alert] (22) Invalid argument : setgid : unable to set group id to Group 4294967295 Niraj Linux - Networking 1 12-13-2001 06:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:49 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
Open Source Consulting | Domain Registration