LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   sub directory permissions (https://www.linuxquestions.org/questions/linux-general-1/sub-directory-permissions-927784/)

jamesRe 02-05-2012 02:53 PM

sub directory permissions
 
Hello LQ community!

I have been working with Linux for about a year now, and have ran into a problem that i cant find an answer for.

I have 2 different groups, groupA and groupB
there's a folder /home/folder1/folder2/folder3

groupA owns all the folders and has full permissions. But groupB needs to be able to read the files in folder3. Also management has said that we are not able to use ACL's

Any help would be appreciated!

Cheers.

kbp 02-05-2012 03:34 PM

Sounds a bit like homework but anyway ...

Code:

chmod o+rx /home/folder1
chmod o+rx /home/folder1/folder2
chmod o+rx /home/folder1/folder2/folder3
chmod -R o+r /home/folder1/folder2/folder3/*

.. this should provide the minimum required permissions

jamesRe 02-05-2012 03:45 PM

That would allow anyone to read the folder.
I need to allow only groupB (as in users from the group groupB) to read the folder.
Besides the users from groupA to be able to read and write.

Thanks for the help though kbp

kbp 02-05-2012 04:32 PM

Without using acl's, you only have a couple of options:
Code:

- make all the users in groupB also members of groupA - this may give more permissions than intended
- allow read for everyone - this gives the least permissions but is not restricted to members of groupB


chrism01 02-05-2012 08:01 PM

What kbp said; basically only one grp can have have the grp ownership and grp perms.


All times are GMT -5. The time now is 07:42 AM.