SOLVED "Export Read Only" Samba-share can still be altered?

Status
Not open for further replies.

Chris_S

Cadet
Joined
Apr 9, 2018
Messages
5
Hi, I have a Samba share set with the "Export Read Only" option to prevent changes. It was my understanding, that this setting is supposed to override individual user rights and create a read-only share of a given dataset.

However, I can still create new files and delete existing files in all subfolders of that share from a windows client logged in as the owner of the dataset.

The only things I found to be genuinely protected in this setting were:
- Folders residing in the root directory of the "read-only" share (which cannot be deleted)
- The content of existing files, even in subfolders (which cannot be changed)

I can however easily:
- Delete all existing folders and files in all subfolders within that "read-only" share
- Create new files and change them within subfolders of that "read-only" share

Did I just misunderstand the concept of "Export Read Only"? Is it not recursively applied to subfolders of a share? Are my observations expected behaviour? Does that mean, that the only way to REALLY achieve a read-only share is to remove writing rights of the dataset owner?

I'd be happy for any help!
 

Chris_S

Cadet
Joined
Apr 9, 2018
Messages
5
Thank you for your support! Based on your post that suggested that my observation was not expected behavior, I recreated the whole volume (destroyed all data) and its dataset, then recreated the samba share, again setting "Export Read Only" and this time also disabling "Apply Default Permissions" (although I can't be sure if this did the trick).

In any case, the share is now behaving as expected with all subdirectories and files protected as well. Sorry I cannot be of any help in clarifying what initially caused my bug, but trying to reproduce it from scratch seemed to be the right thing to do once I knew it was not expected behavior.

All the best!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I wasn't able to reproduce it with either OSX, Linux, or Windows clients. The most likely cause of the issue was that you changed your share config without restarting the samba service. This can leave clients in an inconsistent state (working off of old config file).
 
Status
Not open for further replies.
Top