You are not logged in.

#1 2009-06-07 20:19:29

foolosophy
Member
Registered: 2009-04-17
Posts: 48

Share directory with users (file permission, symbolic link?)

I have a folder called Music inside my home directory. I want the user "family" to be able to explore and read the files in there. I have set up this file permissions (recursively):

drwxr-s--- 201 pablo users  12K jun  7 16:50 /home/pablo/Music

User "pablo" belongs to the groups "pablo" and "users". user "family" belongs only to the group "users" but not to "pablo".
/home/pablo belongs to group "pablo" and it's file permission is 700, and I want to keep it that way.

Creating a symlink in /home/family/Music that points to /home/pablo/Music was of no use because when trying to cd into it, it says PERMISSION DENIED.

How can I have read access to that folder from the user "family"?

Offline

#2 2009-06-07 20:38:52

Teoulas
Member
From: Athens, Greece
Registered: 2009-03-21
Posts: 70

Re: Share directory with users (file permission, symbolic link?)

You can do the following:
a. Add a "family" group and change the group owner of your music directory to "family".
b. Change directory permissions to 750 to allow listing and reading the directory by members of the "family" group but not writing to.
c. Add all family members to the "family" group you've just created (or have just one "family" user to be member of the "family" group).

I'd also move that public directory outside my home directory too.

Offline

#3 2009-06-07 20:41:49

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: Share directory with users (file permission, symbolic link?)

Access Control Lists (ACLs) (http://wiki.archlinux.org/index.php/ACL) might be useful here.  They offer extremely flexible permissions to specified files/folders.  It might be overkill for just this, but its pretty easy to set up.

Offline

#4 2009-06-07 20:42:12

foolosophy
Member
Registered: 2009-04-17
Posts: 48

Re: Share directory with users (file permission, symbolic link?)

I ended up doing a mount --rbind. Too hackish?

Offline

#5 2009-06-07 20:43:29

foolosophy
Member
Registered: 2009-04-17
Posts: 48

Re: Share directory with users (file permission, symbolic link?)

tom5760 wrote:

Access Control Lists (ACLs) (http://wiki.archlinux.org/index.php/ACL) might be useful here.  They offer extremely flexible permissions to specified files/folders.  It might be overkill for just this, but its pretty easy to set up.

I had never heard of that. Thanks for the tip!

Offline

Board footer

Powered by FluxBB