Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have three harddrives and I want to have two permission groups:

Group1:
ShareDrive: Read / Write permission
TVDrive: Read permission
Personal drive: No Read / Write permission (ideally they can't even see it)

Group 2:
ShareDrive: Read / Write permission
TVDrive: Read / Write permission
Personal drive: Read / Write permission

Can anyone tell me how this should be done? Ideally I would have two users account but I can only work out how to set things up with a single user account.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Usually this is simply done by access rights in the filesystem... (except for the visibility)

OK, more detail:

ls /shares
ShareDrive TVDrive homes

chgrp Group1 /shares/ShareDrive /shares/TVDrive
chgrp Group2 /share/homes

chmod -R g=rX,o= /shares/ShareDrive /shares/TVDrive /share/homes

setfacl -R g:Group2:rwX /shares/ShareDrive /shares/TVDrive
setfacl -R -d g::rX,g:Group2:rwX,o:- /shares/ShareDrive /shares/TVDrive

If Group2 is not the primary GID of the users it may be useful to either do once chmod -R g+S or add g:Group1:rX to the setfacl -d.

share|improve this answer
1  
A bit more detail would make this a mre useful answer. –  Dave M Feb 14 '13 at 15:54

The valid users directive in samba's configuration file could help you achieve this. http://www.samba.org/samba/docs/using_samba/ch09.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.