Permissions: Three users, each with a personal folder and different permissions to a common folder

Status
Not open for further replies.

shan81

Dabbler
Joined
Oct 11, 2011
Messages
21
Hi Everybody,

I've decided to rebuild my server from scratch and I'm trying to get my head around the permissions, users and groups used by Unix.

What I'm trying to achieve:

Three users, each with a personal folder, each with different levels of permissions to a a common folder.

My plan is to have three users.

The first user called 'Bob' - The administrator will have Read, Write and Execute (R-W-X) permissions to his personal folder and to the personal folders of the other two users. In addition, he needs R-W-X permissions to the common folder.

The second user, 'Jes' will need R-W-X permissions to her personal folder too and R-W permissions to the common folder.

The third user, ol 'Gil' only needs R-W permissions to their personal folder and read-only permissions to the common folder.

How I'm planning to achieve it:

First, create the volume, lets call it 'freenas'.

Under the volume, we create four datasets.

Dataset 1 - Bob's personal folder called 'bob'.
Dataset 2- Jes' personal folder called 'jes'
Dataset 3- Gil's personal folder called 'gil'
Dataset 4 - the common folder, we'll call it 'common'

Next, lets create some groups.

Group 1- the user group called 'user'
Group 2 - the guest group, called 'guest'

After that, lets create some users and add them to the groups.

User 1- 'bob' - He's added to the 'user' group and 'guest' group.
User 2- 'jes' - Is added to the 'user' and 'guest' group too.
User 3 - 'gil' - Add him to the 'guest' group.

Now lets view the dataset permissions now and change them to suit each user.

Dataset 1 - Bob's personal folder - We don't want anybody else having access to this folder apart from Bob, so we change the owner to 'bob' and the group to 'nogroup'.

Dataset 2 - Jes' personal folder - We make the owner 'jes' and the group 'user' - This will give Jess ownership and give Bob the access he needs.

Dataset 3 - Gil's personal folder - Make the owner 'gil' and the group 'user' - This will give both Bob & Jes access to Gil's personal folder.

Dataset 4 - The common folder, make the owner 'bob' and the group 'user'. The 'other' permission changed to read only - This will give Gil the abilty to view files, but not create new files or delete existing files in common folder.

The Question:

Will this achieve what I want to do?

I've spent a bit of time thinking about it but I'd like an expert to let me know if there is a better way to do this.

Thanks!
 

shan81

Dabbler
Joined
Oct 11, 2011
Messages
21
I've got somewhere with it but I'm still having problems with 'Jes' and 'Gil'.

Both cannot view files on the 'common' dataset and 'Jes' cannot create files on the 'common' dataset.
 

shan81

Dabbler
Joined
Oct 11, 2011
Messages
21
I got it working.

I needed to change the permissions on the 'common' folder to owner: 'bob' group: 'user'. Mode: owner - RWX. Group: RX. Other: RX.

I'll do up a diagram and post it here later to explain it better.
 

shan81

Dabbler
Joined
Oct 11, 2011
Messages
21
permissions - cropped.jpg


I changed 'Jes' access to read-only on the 'common' dataset; as this was the only way I could get the sharing working.

For me thought, it's of minor concern.
 

boyett

Dabbler
Joined
Jun 27, 2012
Messages
17
@shan81
Thank you very much.. :D
 

Robert Smith

Patron
Joined
May 4, 2014
Messages
270
Hello,

Thank you for the detailed explanation. I copied your configuration. Here is what I am observing:

Using CIFS; if Jes connects to the Jes dataset share first, she gets full access (include write permissions) on all other datasets as well. Are you observing the same thing?
 
Status
Not open for further replies.
Top