SOLVED Advice on CIFS sharing

Status
Not open for further replies.

ferroresonance

Dabbler
Joined
Aug 19, 2016
Messages
21
Greetings, the abstract of this question is:
What is the best way to set up a Public share for media and a Private share for personnel documents.

So far i have created two seperate users freeNAS and freeNAS2 with passwords the same as user (will be changed). I have created two seperate ZFS data sets DataSetWin_Private and DataSetWin_Public with share type windows. The datasets have the following permissions:
  • DataSetWin_Public - Owner: root Group: freeNAS Permission type: windows
  • DataSetWin_Private - Owner: root Group: freeNAS2 Permission type: windows
I have also created tow CIFS shares, freeNAS_Public and freeNAS _Private. Both have apply default default permission checked and allow guest access unchecked

I can see both shares in windows, i can map a nw drive to freeNAS_Public using freeNAS account and can read and write to it, however i cannot map a network drive to freeNAS_Private using freeNAS2 account.

Basically all i want to do is have a private folder for myself that only i can access and see using a separate account and have a public dumping ground for media etc.

Am i on the right track? What is the best method for this
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
you're on the right track.

Primary way to control access is through groups and owners.

If you want freeNAS_Private to be only seen and accessed by freeNAS2 user then make freeNAS2 user the owner of freeNAS_Private dataset and set group to "nogroup". Then make sure freeNAS_Private dataset has permission of u=rwx,g=,o=,

Then for the FreeNAS_Public dataset just set the group to a group you create in the FreeNAS GUI (give it whatever name you want) and then add any user that you want to be able to access that share as members of the group. Then set group permission on freeNAS_Public dataset as g=rwx.

hope this helps.
 

ferroresonance

Dabbler
Joined
Aug 19, 2016
Messages
21
Hi, thanks for reply, still cant map the drive to the freeNAS_Private folder using freeNAS2 permissions on data set.

When i created the freNAS2 user should i have created a freeNAS2 group?

when i change the dataset permissions on DateSetWin_Private to owner freeNAS i can create and delete folders within its associated CIFS share.

Sorry very new to freeNAS
 

Attachments

  • CIFS setup.png
    CIFS setup.png
    27.8 KB · Views: 375
  • DataSet Permissions.png
    DataSet Permissions.png
    36.8 KB · Views: 365
  • Overview.png
    Overview.png
    57.8 KB · Views: 340
  • Users.png
    Users.png
    38.9 KB · Views: 343

ferroresonance

Dabbler
Joined
Aug 19, 2016
Messages
21
Update..

I have found what i needed to do was to map network drive to freeNAS_Public (Using freeNAS), reboot, then map network drive to freeNAS_Private (using freeNAS2), reboot. After the final reboot i can open the either mapped drive and was prompted for the UN and PW. The required user and pw aligned with the dataset permissions from above. The only thing i did differently is to have root as an owner on both datasets but had different groups (being freeNAS and freeNAS2) which were setup when the users were created.

Why would you assign a user and no group? Still a bit rusty spent all my life on windows systems which are fairly straight forward
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I have found what i needed to do was to map network drive to freeNAS_Public (Using freeNAS), reboot, then map network drive to freeNAS_Private (using freeNAS2), reboot.
sorry I'm not following this. What does "map network drive" mean?

What groups do you have setup and what are the members of those groups? I see you created a "FreeNAS" group? What users are in this group?

Why would you assign a user and no group?
This question has not simple answer but one scenario I could think of is the situation you laid out. Where you have a dataset (FreeNAS_Private) which you want to have accessed by only one user. One way you could accomplish that is to set the owner (user) to the user a single user that you want to have r/w access to the dataset and then set group (owner) to "nogroup" because it is highly unlikely any user will be a part of this group unless you specified that in the GUI. This way the group permissions don't apply because no user is a member of "nogroup".

Permissions are quite complicated and are so unique to every situation. This is why there has been no real guide written for permissions.
 
Status
Not open for further replies.
Top