Mounting

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
mchelmi
Level 1
Level 1
Posts: 2
Joined: Thu Aug 22, 2019 5:52 am
Location: France

Mounting

Post by mchelmi » Thu Aug 22, 2019 6:28 am

Hi all,

I'd like to achieve to mount some NAS folders for each users.
I already know how to mount NAS directories using fstab and a credential file.
We've got a Synology NAS drive at home, used for storing administrative papers, work files and of course some music, videos, pictures ...
As our kids start to learn how to use a computer, I've set up a thin one (Dell optiplex 5050 micro).
Here is what I'd like to do: two users on the computer (already done): parents and kids. Parents must have r/w access to all the different remote folders, and kids must have access just to "kids" directory" (r/w), and video and music (read only). Of course, I know how to manage rights on the NAS, but how to mount Parents, Video, Music, Common with Parents credential if Parents are logged, and mount Kids, Video and Music with Kids credential, if kids account is used ? Here stops my knowledge... although I know how to do this with W$ (pretty straight forward... :oops: ), I'm stuck with that.

Thanks for your time

altair4
Level 19
Level 19
Posts: 9689
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting

Post by altair4 » Thu Aug 22, 2019 7:52 am

I already know how to mount NAS directories using fstab and a credential file.
How about something like this example:

Code: Select all

//synology/kids /mnt/kids cifs username=xxx,password=yyy,nounix,uid=parents,gid=kids,dir_mode=0770,file_mode=0660 0 0
Parents and Kids will have r/w access to the "kids" fodler on the NAS.

Code: Select all

//synology/video /mnt/video cifs username=xxx,password=yyy,nounix,uid=parents,gid=kids,dir_mode=0750,file_mode=0640 0 0
Parents will have write access to the video folder (7) but kids will have read only access (5).

Did I interpret the use case correctly?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

mchelmi
Level 1
Level 1
Posts: 2
Joined: Thu Aug 22, 2019 5:52 am
Location: France

Re: Mounting

Post by mchelmi » Wed Aug 28, 2019 9:26 am

Thanks for your reply altair4, and sorry for my long reply delay, I had to go to work, and I'm currently at sea, with a very poor internet connection...

Looks like you get it, but I don't : :oops:

What would be username and password ? Same ones in both cases ? Where is specified which user is logged ?
Or the kids account has to be in kids group, and thus, when fstab will be executed, will have a different rights ?

I hope I can make myself as clear as possible (I'm not an IT expert, and I'm french).

Thanks again for your time.

altair4
Level 19
Level 19
Posts: 9689
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting

Post by altair4 » Wed Aug 28, 2019 1:50 pm

You stated that you only have two users: parents and kids so what I was thinking in my original answer was that a single username and password ( parents ) would be used to access the NAS and that access to the mounted share be controlled on the client through the dir_mode / file_mode parameters in fstab.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Post Reply

Return to “Other networking topics”