Is there anyway to to set user share permissions through the terminal?


Recommended Posts

I have a share to a read only shapshot on the btrfs disk that I use for backups. It's created by first creating the snapshot, then just going to shares in the web admin and setting permissions on the snapshot as normal. If the shapshot is deleted and recreated the permissions persist and everything is fine.

 

However, if I reboot the server or change the permissions of any share then it's broken. I need to go in an manually update the snapshot share (and create it again first) to fix it. Typically I just toggle a user in the list from read only to read/write and back and things work again. Which I often forget to do.

 

I know this is a non-standard config setup but I'd like a way to perform that toggle automatically in my backup user script to alleviate this problem. But I don't know if the unraid share permissions are exposed in anyway like this. I know the underlying linux permissions are, but that is not what I'm trying to change here. It's the SMB share.

  • Like 1
Link to comment
  • 4 months later...

There's a really stupid solution to this problem that was kind of obvious once I spent some time messing around with things and reading a bit about samba.

 

All I had to do was run 'samba' in the script right after the snapshot. This forces samba to reload and re-evaluate the permissions fixing the issue until some one (me) screws around with access control again. But since it runs the fix every time there isn't a problem any longer.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.