Parent Folder Only Read-Only


Recommended Posts

New to unRAID and linux-like things in general, been setting everything up over the last few days and learning the ropes.

One issue that has come up is with one of the SMB shares I've set up.

 

Let's say we have the folder Media, with the subfolders Music and Video. The share is set to export, private, with a user (myself) given read/write access.

 

In Windows (10), I can access each of the folders using the appropriate name/password, can read/write into the Music and Video folders, but cannot write to the parent Media folder.

 

I've tried setting up and logging in under a different name too.

even stranger, I have another share with the exact same setup with the only difference being the share name. This one lets me write to the parent folder just fine.

 

[Edit]

As time has gone on and I've installed more things and added more folders, this issue has come up again now with other subfolders within the Media folder also being read-only.

Link to comment

how did you create the parent folder? Worth checking permissions on it via terminal. Shares should be owned by nobody:users and should have drwxrwxrwx permission for directories and -rw-rw-rw- for files

 

If you are too new to Linux terminal, try new permissions under tools tab in docker UI, I just prefer terminal because it can confirm the issue before you do anything. If it's permissions, also should try to figure out why you are ending up in this situation in the first place

  • Upvote 1
Link to comment

Just learning my way around the terminal now. Ok, so most folders are showing:

 

drwxrwxrwx 1 nobody users

 

with the problem folder showing:

 

dr-xr-xr-x 1 nobody users

 

If I look inside the problem folder, its contents are all over the place too:

 

drwxrwxrwx 1 myname users  4096 Jan 25 13:04 Folder 1/
drwxrwxrwx 1 root   root  94208 Jan 25 13:03 Folder 2/
drwxr-xr-x 1 nobody users   183 Jan 25 01:35 Folder 3/
drwxr-xr-x 1 nobody users   162 Jan 24 17:31 Folder 4/
drwxr-xr-x 1 nobody users    48 Jan 24 18:24 Folder 5/

 

In the example above, the folders 3 4 and 5 were created automatically by a docker app. Folder 1 was copied over from Windows - has it inhereted permissions from Windows?

 

I could use that New Permissions feature, but like you say I'd like to figure out what's going wrong.

 

Pretty sure I would have made the folder from within Windows after setting up the share. I have also been using Krusader.

 

Link to comment

It is important that any dovker spots are configured to create and folders/files on the main array with correct permissions for trouble free working as they can bypass the normal Unraid mechanisms.  
 

The New Permissions tool is what is needed when things go wrong. Personally I think this tool would be better renamed to something like Reset Default Permissions - the current naming is a hang-over from when it was a required step when upgrading from Unraid versions prior to Unraid v5.

Link to comment
36 minutes ago, RogerTheBannister said:

Just learning my way around the terminal now. Ok, so most folders are showing:

 

drwxrwxrwx 1 nobody users

 

with the problem folder showing:

 

dr-xr-xr-x 1 nobody users

 

If I look inside the problem folder, its contents are all over the place too:

 

drwxrwxrwx 1 myname users  4096 Jan 25 13:04 Folder 1/
drwxrwxrwx 1 root   root  94208 Jan 25 13:03 Folder 2/
drwxr-xr-x 1 nobody users   183 Jan 25 01:35 Folder 3/
drwxr-xr-x 1 nobody users   162 Jan 24 17:31 Folder 4/
drwxr-xr-x 1 nobody users    48 Jan 24 18:24 Folder 5/

 

In the example above, the folders 3 4 and 5 were created automatically by a docker app. Folder 1 was copied over from Windows - has it inhereted permissions from Windows?

 

I could use that New Permissions feature, but like you say I'd like to figure out what's going wrong.

 

Pretty sure I would have made the folder from within Windows after setting up the share. I have also been using Krusader.

 

It could be a permission setting in your docker configuration.  If there is a setting for UMASK, set it to 007.  The UMASK would only affect the files created by the docker application.

 

If you created the folders from Windows, I am not sure about why the permissions were set that way.  Make sure in the share settings that SMB User Access is set to Read/Write.

 

I have not used Krusader before, however, I was looking at the documentation and it does have the ability to set permissions of files and folders that you create so maybe you could have accidently created them with those permissions.

Edited by JoeUnraidUser
Link to comment
1 hour ago, JoeUnraidUser said:

I am assuming your share is "/mnt/user/Media".  If it is not, substitute the name of your share in the command.

 

Run the following from a terminal to fix your file ownership and permissions:

chown -cR nobody:users /mnt/user/Media
chmod -cR ug+rw,ug+X,o-rwx /mnt/user/Media

 

 

This did the trick, thanks. Everything seems to be as it should now.

I did try the New Permissions tool first, which I see just runs the same command but with a different combination of letters. My head hurts a bit trying to decypher them, but long story short, it didn't work.

 

1 hour ago, JoeUnraidUser said:

It could be a permission setting in your docker configuration.  If there is a setting for UMASK, set it to 007.  The UMASK would only affect the files created by the docker application.

 

If you created the folders from Windows, I am not sure about why the permissions were set that way.  Make sure in the share settings that SMB User Access is set to Read/Write.

 

I have not used Krusader before, however, I was looking at the documentation and it does have the ability to set permissions of files and folders that you create so maybe you could have accidently created them with those permissions.

 

To be clear, the folder in question was made manually before I had even started installing any dockers.

 

Going though my list of dockers, there are a couple which have the UMASK key, which is set to 000. They do not have any direct association with the folder, except one of them is Krusader. If I had used Krusader to create the folder, could this have been the cause? What is the difference between 000 and 007?

 

In addition, all the dockers UIDs and GIDs are 99 and 100 respecively, except again for Krusader, which are both set to 0. I'm starting to suspect something here...

I remember changing these to 0 after looking up how to fix some other issue which I have now forgotten.

Link to comment
20 minutes ago, RogerTheBannister said:

UMASK key, which is set to 000

this is fine. It simply means permissions of newly created files will be exactly what is being requested

 

22 minutes ago, RogerTheBannister said:

What is the difference between 000 and 007?

umask is used to block permissions on newly created files. 007 means new files will not get any permissions for others. see https://en.wikipedia.org/wiki/Umask

23 minutes ago, RogerTheBannister said:

dockers UIDs and GIDs are 99 and 100 respecively, except again for Krusader, which are both set to 0

99 is user nobody, 100 is group users. 0 is root. I think this is the main issue. 

  • Upvote 1
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.