June 5, 20242 yr Hello, I have moved over from a FreeNas Server to Unraid recently and have felt like I cannot do a few things I know I can/should be able to set up. I have my main share called Main-Share inside this share I have a few directories (Documents, Photos, Videos, etc) it is setup as shown below: > Main-Share - > Documents -- > MyDocument.txt - > Photos -- > MyPhoto.jpg -- > SummerPhotos -- > BeachPhoto.jpg - > Videos -- > MyVideo.mov I aim to lock down Documents, Photos, and Videos from being able to get deleted (by anyone but root) but give all users the ability to read/write/execute the files in what would be sub-folders of the Main-Share. I have been looking to add setting returning the top-level folders to sticky but this results in the folder being deleted but always returns empty as it deletes the users' files inside. I have made the folders using my root account using mkdir Photos so it is not owned by my user account. What permissions am I missing on either Unraid or Chmod to make this a reality?
June 5, 20242 yr Community Expert The User Shares folder/directories should not be delete-able if you are accessing them via SMB. using a client You can delete everything within a User Share but not the Share itself. (Unless you have jumped thorough some hoops to make a SMB share for the user directory.) For that you will have to use the GUI or the command line. I seem to recall that you can't even remove the share using the GUI unless the share is empty.) You should also make your shares using the GUI. There is a button on the SHARES tab which will allow you to add a new user share. That will guarantee that the owner, group and permissions are set correctly. When setting up Unraid, the command line should never be needed. If you think you need it, you are wrong and have missed the proper setting page in the GUI. The command line is only be necessary for troubleshooting or fixing something because someone (or some Docker container) has screwed things up! Access Permissions are done at the Share level. You click on the share name on the SHARES tab and you will be taken to this page: You set the Export in the SMB Security section and the SMB User access section will appear. You then can set the access permission for each user. Edited June 5, 20242 yr by Frank1940
June 10, 20242 yr Author Thanks, this is helpful, but I am used to nested shares allowing me to map one share to a drive and allowing me to control the permissions in the GUI like I see you suggested. This solves it if I map multiple shares to multiple drives on my computer.
June 10, 20242 yr Community Expert Yo 28 minutes ago, AdamB. said: I am used to nested shares allowing me to map one share to a drive and allowing me to control the permissions in the GUI like I see you suggested. You can do this by creating a Symbolic Link share. But it only creates another User Share that points to a directory within a User Share. Here is a guide to doing that: https://forums.unraid.net/topic/137806-creat-a-user-share-containing-a-portion-of-another-user-share/#comment-1251067 Be sure and read the entire thread and understand what you are creating and its ramifications. Most of the time, folks are wanting to grant permission to another user to have access to only a portion of a User Share. (Setting SMB is a minefield. The folks who really understand how to do it have lots of training, sometimes years of full-time experience, and are earning big bucks for their expertise. I am not one of those. I understand just enough to do some simple things and to make me really dangerous if I try to do more then that! Unraid Samba has been setup to allow most folks to be able to quickly get it working in a typical home environment.)
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.