No permission to open/save existing file

Status
Not open for further replies.

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What program is this? Can you try local storage or perhaps a "real" Windows Server share or even another share handled by Samba in a different OS?
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
On Saturday, after the file changed to read-only again, I went into freenas and clicked on the storage dataset, clicked change permissions, left everything as they were but ticked recursive (it is set to windows, both owners set the same as 'admin'), and clicked ok, just like I did 3 hrs eariler. This time, It appears that the setting has been remembered as its now monday, i've been working with the program all weekend and it's not had any issues with the file changing to readonly.

The program is EasyPC (PCB cad), but the same happens with .txt files in notepad++.

Hopefully this will remain the case but if it changes again i'll update this thread. Is there any issue with having both owner (user) and owner(group) set the same?

Export recycle bin now exports the folder path of a deleted item(s), but not the deleted file(s) to a .recycle folder.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Hopefully this will remain the case but if it changes again i'll update this thread. Is there any issue with having both owner (user) and owner(group) set the same?

No, they might have the same name, but they're not the same entity. This is a perfectly valid solution.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
"Export recycle bin" does not work the way that you think it does. Deleted files will not appear in the Recycle Bin of the client. See here: https://www.samba.org/samba/docs/man/manpages/vfs_recycle.8.html

The Recycle Bin will not appear in Windows Explorer views of the network file system (share) nor on any mapped drive. Instead, a directory called .recycle will be automatically created when the first file is deleted and recycle:repository is not configured. If recycle:repository is configured, the name of the created directory depends on recycle:repository. Users can recover files from the recycle bin. If the recycle:keeptree option has been specified, deleted files will be found in a path identical with that from which the file was deleted.

I have seen some problems with how the zfsacl vfs module interacts with other file sharing protocols (as well as some difficult-to-quantify buggy behavior). I think it might be related to the interaction between FreeNAS default "nfs4:mode=special", which is listed in samba documentation as deprecated, and other "nfs4:mode" parameters. I have not had time to do proper testing so as to be able to consistently reproduce the errors I've seen (and file a bug report). Erratic behavior can be somewhat mitigated by using the setgid bit on the problematic directory:
Code:
chmod g+s <directory name>
This will ensure that all files will be created with the group that owns the directory, which will force your ACLS into a somewhat more consistent state.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Thanks for the reply. At the moment, it seems to be behaving itself and all is fine so if it aint broken.... If it happens again, i'll give your suggested chmod a try.

Recycle-bin:
Yes I understand that its not the windows bin. The problem is that when a file is deleted, it creates the path as expected, but the 'deleted' file is not copied to the newly created location.

It would be useful to change the setting so it doesn't create the path, but just puts files in a single .recycle folder. As this is not possible with the GUI, would you be kind enough to tell me how to do this with the CLI? From the link you gave me, it looks like i need to set recycle:keeptree=no

I'm not versed in CLI commands, I'm a GUI kinda guy lol :)
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Thanks for the reply. At the moment, it seems to be behaving itself and all is fine so if it aint broken.... If it happens again, i'll give your suggested chmod a try.

Recycle-bin:
Yes I understand that its not the windows bin. The problem is that when a file is deleted, it creates the path as expected, but the 'deleted' file is not copied to the newly created location.

It would be useful to change the setting so it doesn't create the path, but just puts files in a single .recycle folder. As this is not possible with the GUI, would you be kind enough to tell me how to do this with the CLI? From the link you gave me, it looks like i need to set recycle:keeptree=no

I'm not versed in CLI commands, I'm a GUI kinda guy lol :)
CLI won't help in this case as the changes you make will be overwritten the next time FreeNAS reloads samba config info from your config database. The changes aren't persistent, and will vanish any time you touch samba in the GUI. Hence, there's not much point in messing with smb4.conf file through the CLI except for diagnostic purposes.
 
Status
Not open for further replies.
Top