Freenas 9.3 randomly changing permissions then reverting back to previous settings

Status
Not open for further replies.

TommyG

Cadet
Joined
May 5, 2016
Messages
1
As my Freenas server is on a totally different IP range to my router and has no connection to anything other than three computers in my house. For easiness, I simply gave all the folders unix permissions 777 and created a few Windows and Linux shares.

Occasionally for no reason at all, however, I will get "permission denied" when writing from my Windows machine. Last night I noticed that it'd set all my files to read only in one folder. I tried various methods, even "chmod -R 777" from the CLI, which just returned "operation not permitted". I decided just to create a new folder an copy all the files to it, then create a whole new Windows share and remap everything.

Yet, after work this evening, I noticed that I have write permissions again, despite not touching anything.

Is this a bug or am I missing something?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You are missing some things:

1. Windows shares should be on datasets that are set for "Windows" and therefore use NFSv4 ACLs and not unix permissions. What is likely happening is your setting unix permissions (as evident by the 777) and later an ACL is created which isn't a "wide open" permission. Then when you try to chmod the permissions you get the "operation not permitted" because the dataset properties based on setting the dataset to "Windows" type are protecting the ACLs. unix permissions and ACLs are, for the most part, mutually exclusive, so you can't represent one with the other.

2. I don't know if you know this, but you shouldn't be sharing the same files from a CIFS share and an NFS share. Not only can you have problems with file corruption and such, but you'll have permissions issues because NFS uses unix and CIFS uses ACLs. ;)
 
Status
Not open for further replies.
Top