addady
asked on
file permission inheritance from the above folder
Hello,
I'm user CentOS 4.3 (RHEL 4 clone) ext3 file system.
What need to be done so that new file will inheritance his directory permition.
For example:
user1 and user2 are in group users
ls -l dira
drwxrwx--- 1 user1 users 69 Mar 29 20:02 dira
When user user2 or user root will create a file in dira, I would like that this new file permission will be the same as the home directory dira.
How can I set it?
Thanks,
Addady
I'm user CentOS 4.3 (RHEL 4 clone) ext3 file system.
What need to be done so that new file will inheritance his directory permition.
For example:
user1 and user2 are in group users
ls -l dira
drwxrwx--- 1 user1 users 69 Mar 29 20:02 dira
When user user2 or user root will create a file in dira, I would like that this new file permission will be the same as the home directory dira.
How can I set it?
Thanks,
Addady
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
lol.... as I mentioned may not be a good way but it's work :o)
ASKER
Thank you ahoffmann,
>you only can inherit the directories group setting if the directory permission has set the SGID bit >(g+s), for file premissions you have to use the shells umask
That can be fine.
Following my example above, what setting need to be done in order that all file/dir under "dira" will have group "users" and permition rwx, no matter how create the file/dirs?
>AFAIK using ACLs might be the proper and clean solution
If the first option will not work I will try acl, how difficult is to implement it?
Thaks,
Addady
>you only can inherit the directories group setting if the directory permission has set the SGID bit >(g+s), for file premissions you have to use the shells umask
That can be fine.
Following my example above, what setting need to be done in order that all file/dir under "dira" will have group "users" and permition rwx, no matter how create the file/dirs?
>AFAIK using ACLs might be the proper and clean solution
If the first option will not work I will try acl, how difficult is to implement it?
Thaks,
Addady
> .."dira" will have group "users" ..
chmod g+s dira
> .. that all file/dir .. permition rwx, no matter how create the file/dirs?
as I said you need to set proper umask for each user no matter which one you mean
> .. try acl, how difficult is to implement it?
security is a process not a product
hence you have to get used to ACLs first, then define your requirements and then configure your ACLs
chmod g+s dira
> .. that all file/dir .. permition rwx, no matter how create the file/dirs?
as I said you need to set proper umask for each user no matter which one you mean
> .. try acl, how difficult is to implement it?
security is a process not a product
hence you have to get used to ACLs first, then define your requirements and then configure your ACLs
this will not work,
you only can inherit the directories group setting if the directory permission has set the SGID bit (g+s),
for file premissions you have to use the shells umask
BTW, your requirement is impossible to implement: assume a directory permission of 555 then you cannot create a file, same applies to something like 444 for the directory