I’m using FreeNAS for more than 2 years for our internal centralized file storage in our company. It is free and open source and has a lot of features. One feature that I like the most is the ability to limit access to certain data sets per user or group. They are using CIFS with Samba, and since I upgraded to FreeNAS 9.2.1, which uses Samba 4.1.3, it caused a problem with file modified permission by default.
I got a lot of reports from my teammates as soon as I upgraded to FreeNAS 9.2.1 — they can open a document file but every time they save it, it always asks to save as a new file, because the file they opened is read-only. It caused a temporary panic, because by system they are all working using that file storage.
After digging around for a couple of minutes, I found a bug report in the FreeNAS trac. The bug is currently under investigation and reportedly will be fixed in the next release 9.2.1.1. To solve this temporarily and save me from the panic, there is a workaround. I need to manually give modified permission from the terminal.
Here is the workaround I got from Alex Philippov:
1. Check “Inherit Owner” and uncheck “Inherit Permissions” in Windows Share configuration.
2. Set ACLs permissions via setfacl. To update permissions recursively for folders, use this command:
find /mnt/path_to_share/ -type d -exec setfacl -m owner@:full_set:fd:allow,group@:modify_set:fd:allow {} ;
And for files:
find /mnt/path_to_share/ -type f -exec setfacl -m owner@:full_set::allow,group@:modify_set::allow {} ;
Updates:
The bug has been fixed in FreeNAS 9.2.1.1 — you can download it here.
