I have also question regarding to sgid.
Let say I have set sgid to /home/office/ and permission like "d r w x r w
s- - -" myuser office
Know when anyone part of office group will create file or directory it will
be automatically owned by that user with office group.
If I create directory it will automatically get drwxrws permission as well.
However when I create this directory from WIN98 (using samba) this
directory will not have sticky bit set to "s" .
Any idea?

How do I recursively change mode on directory structure to drwxrws- - -
(but only for directory not for files) chmod -R 2770 will create sticky bit
on all file as well?

Thanks




                                                                                       
             
                    Matthew Melvin                                                     
             
                    <matthewm@webcentr        To:     John MacLean <[EMAIL PROTECTED]>    
             
                    al.com.au>                cc:     RedHat List 
<[EMAIL PROTECTED]>          
                    Sent by:                  Subject:     Re: suid, guid, sticky etc 
bits          
                    redhat-list-admin@                                                 
             
                    redhat.com                                                         
             
                                                                                       
             
                                                                                       
             
                    10/25/00 09:11 PM                                                  
             
                    Please respond to                                                  
             
                    redhat-list                                                        
             
                                                                                       
             
                                                                                       
             



On Wed, 25 Oct 2000, John MacLean wrote:

> Hi all,
>  Anyone want to give me an explanation of the 'extended' permissions
bits.
> Such as
> suid - program runs with root permissions?
> guid - program runs with group permissions?
> sticky - only original creator can delete? What about other members of
the
> group? What about root? Does this hold even if others have write access?
>

sticky = 1000 = ---------T
sgid = 2000 = ------S---
suid = 4000 = ---S------

in each case the 'special' letter is shown where the execution bit normally
appears.  A capital letter means the execution bit is not set, a lower case
letter means the execution bit is set.

when you do a chmod and specifiy less than 4 digits it assumes the missing
leading numbers are 0.  so "chmod 777" == "chmod 0777"

these extra bits have different meanings depending it is refering to a
directory or a file.

Sticky on a file is depreciated and (as far as I know) as no effect.

Sticky on a directory means that even if you have read/write permissions to
a file in that directory you can not delete the file unless you are its
owner (being in the group is insufficent.) The sticky bit is not
inheriented
by files or directories created within the stick directory.

sgid on a file means that executing the file will be done with the
effective guid set to match the file.

sgid on a directory means that files and directories created with in that
directory will be owned by the same group as the parent directory
regardless
of the guid of the user creating the file.  Directories created under a
sgid directory will inherient the sgid bit so that it will continue to
propgate down the tree.

suid on a file means that executing the file will be done with the
effective
uid set to match the file.

suid on a file is depreciated and (as far as I know) as no effect.

The best way to get it straight in your head is experimentation becuase it
can get wierd. Like...

---S---rwx    1 root     wheel      316848 Oct 26 11:10 /tmp/bash

... means that anyone can get a suid shell as long as they are not root
already or in the wheel group.  I think I'll delete that example now... ;)

M.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list






_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to