FreeNAS 9.2.1.5 - BTsync / CIFS / ZFS ACL and Permission issues

Status
Not open for further replies.

gdeyoung

Cadet
Joined
Jun 16, 2014
Messages
2
I have a freshly installed 9.2.1.5 FreeNAS server. I have a zraid1 storage pool configured. I also have multiple datasets configured under the pool. One for each user and a general data and media data set.

zpool
-> user1
-> user2
-> user3
-> user4
-> data
-> media

Each user is owned by them and their group owns their dataset. So the user1 dataset is owned by user: user1 (guid 1001)/ group: user1 (guid 1001)

The data and media dataset is also owned by user1 (guid 1001) and the users (guid 1005) group). I made a users group and put all the users in the group to grant them access to the data and media datasets.

I have CIFS setup and everything works as intended. I have a seperate CIFS share for each of the datasets. The media and data datasets allow guest access. The users can see and map the shares for them. They can edit, write, modify files and folders. I originally setup the permissions in the volume manager GUI and configured them for windows / mac ACL with 775.

I then installed the BTsync plugin via the installer and the installer created the btsync-1 jail. I followed the guide from the February Bittorrent Sync blog to configure everything. I created a FreeNAS user called btsync at GUID 817 and btsync group at GUID 817.

I tried mounting the storage to the btsync-1 jail and adding the FreeNAS user btsync to the FreeNAS users (GUID 1005) group. At that point I couldn't see the files and folders in the jail mount point. I then went into the jail and may a jail users group of users (GUID 1005) and then made the default group for jail user btsync (GUID 817) to users. I based this on the forum post at:

http://forums.freenas.org/index.php?threads/btsync-plugin-permission-issue.18215/

At this point my btsync plugin could read files and folders in the mounts.

My next thing I tried was to change the ACL in the CML via chmod and in the FreeNAS web GUI to 777 for the folders. Both worked and I my BTsync plugin could read/write/modify files in the mounts.

Then I added BTsync folders in the BTsync web GUI from other outside systems and synced them into FreeNAS to test things out. Any files or folders created by the BTsync plugin have a user of btsync (GUID 817) and group: users (GUID 1005).

I then try to access the synced files through my CIF shares. All the files are there. But my user1 user only has 755 access to the files. User1 can read, but can't edit, change or modify the any files and folders written by the BTsync sync process with a user of btsync (GUID 817) and group: users (GUID 1005). The privileges of u:btsync/g:users was verified by a ls - l of those synced files/folders from the command line. I then tried to change the ACL to UNIX ACL from the FreeNAS GUI and that does not fix anything. I can force a change to 777 from the FreeNAS web GUI or from the command line with chmod and then everyone (user1 and btsync) is happy and can write/edit/delete/modify files. However any adds/changes/modifications by BTsync puts those files and folders back to 755 with u:btsync / g:users. My user1 should have access since it is in the FreeNAS users group but it can only read the files through CIFS.

I have searched and searched and found bug #4151 with FreeNAS 9.2.1 / CIFS / ZFS ACL's

https://bugs.freenas.org/issues/4151
http://docs.oracle.com/cd/E18752_01/html/819-5461/gbacb.html
http://forums.freenas.org/index.php?threads/announcing-freenas-9-2-1-release.18278/page-4

But it looks like it was resolved in 9.2.1.2.

I also found these forum posts and tried their fixes:
http://forums.freenas.org/index.php?threads/btsync-plugin-permission-issue.18215/
http://doc.freenas.org/index.php/Adding_Jails#Adding_Storage
http://forums.freenas.org/index.php?threads/share-dataset-between-two-jails.16591/#post-85579
http://forums.freenas.org/index.php?threads/file-sharing-can´t-modify.18821/
http://forums.freenas.org/index.php?threads/i-dont-understand-jails-storage.19750/#post-111244

I'm at the frustrated and hair pulling out stage. I would really like to use the plugin architecture, but either I don't understand it well enough yet or it is buggy.

I would appreciate some help and advice on getting this resolved and helping me to better understand how it works.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I realize this isn't too helpful, but you'll find very little support with permissions problems here. It's something that you, for the most part, just have to figure out and understand for yourself so you can apply permissions appropriately.

I do plan to have a "permissions" guide that will be available soon (no ETA at the present) that should give you the knowledge to figure most problems out for yourself.
 
Status
Not open for further replies.
Top