LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   group permissions for subfolders only (CentOS) (https://www.linuxquestions.org/questions/linux-newbie-8/group-permissions-for-subfolders-only-centos-802906/)

dahliash 04-19-2010 01:39 PM

group permissions for subfolders only (CentOS)
 
Hi,

Is there a way to allow other members of my group to access subfolders under my home directory, but not my home directory itself?

I'm using CentOS 5.4

Thanks,
Dahlia.

amani 04-19-2010 01:52 PM

http://content.hccfl.edu/pollock/AUn...ermissions.htm

"Suppose some user attempts to read a file with some Unix command such as cat. The system call read() is used and the "r" permission is required. The system checks to see if the user is in fact the owner of the file. If so, the access is permitted if the owner has been granted "r" permission. If not, the system check to see if the user is a member of the group of the file. If so, access is permitted if the group has been granted "r" permission".

Tinkster 04-19-2010 03:27 PM

Quote:

Originally Posted by amani (Post 3940608)
http://content.hccfl.edu/pollock/AUn...ermissions.htm

"Suppose some user attempts to read a file with some Unix command such as cat. The system call read() is used and the "r" permission is required. The system checks to see if the user is in fact the owner of the file. If so, the access is permitted if the owner has been granted "r" permission. If not, the system check to see if the user is a member of the group of the file. If so, access is permitted if the group has been granted "r" permission".

While this is all technically correct it has next to nothing
to do with the OPs question. It doesn't touch on permissions
of directories, it doesn't touch on the subject of the entire
path to the files and their permissions.


Quote:

Is there a way to allow other members of my group to access subfolders under my home directory, but not my home directory itself?
Depends on what exactly your requirement is.

If you e.g. have
Code:

drwx--x--x 124 dahliash users 20480 2010-04-20 08:21 dahliash
drwxr-xr-x  2 dahliash group  4096 2010-04-20 08:22 dahliash/share

users KNOWING the path to share will be allowed to read files
in share and cd into it, but won't be able to look at your
homes immediate contents.



Cheers,
Tink

dahliash 04-20-2010 12:31 PM

changing the group permissions to +x did the trick
 
... before I just had it group-readable, not group-executable, which was not enough.
Thanks!

Quote:

Originally Posted by Tinkster (Post 3940717)
While this is all technically correct it has next to nothing
to do with the OPs question. It doesn't touch on permissions
of directories, it doesn't touch on the subject of the entire
path to the files and their permissions.



Depends on what exactly your requirement is.

If you e.g. have
Code:

drwx--x--x 124 dahliash users 20480 2010-04-20 08:21 dahliash
drwxr-xr-x  2 dahliash group  4096 2010-04-20 08:22 dahliash/share

users KNOWING the path to share will be allowed to read files
in share and cd into it, but won't be able to look at your
homes immediate contents.



Cheers,
Tink



All times are GMT -5. The time now is 09:47 AM.