Newsgroups: alt.linux
From: "menno" <me...@desktop.local>
Date: Thu, 22 May 2003 08:39:47 GMT
Local: Thurs, May 22 2003 4:39 am
Subject: Re: Directory permissions (newbie question)
On Thu, 22 May 2003 01:55:33 +0000, Peter wrote: Hello again. > Hi Menno / Mari, > Thanks for your help. I appreciate it! No problemo. > I'm using: Good. > chmod 1770 /home/shared > I've reread the man file on chmod, and finally (with some testing) Way to go. > believe that I understand it. [...] > I assume that "setting the user id" (4) and "group id" (2) in the first No it's not - "equivalent to using the chgrp and chown commands". > byte is equivalent to using the chgrp and chown commands, If you suid/sgid an executable and run it as another user the "efective user/group id" of the process will be that of the user/group owning the file (not the one running it). To illustrate, copy and paste the following in a file "get_sugid.c": #include <stdio.h> int main(void){ printf("Real UID\t= %d\n", getuid()); printf("Real GID\t= %d\n", getgid()); return 0; } ------------------------------------------------------- And compile it using: Now try out some differend user/group permission combinations and fire it up as There is a use for the "sgid" bit on non executable files also. As it is > so I will That is the way i go about it, as well. If some user needs accesse just > always just set that bit to 0 or 1 and use the chgrp and chown commands. stick 'am in the group(s). I always rip the rights for "others" of of any suid-binarys as well You can "find" suid files using: man find -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||