Permissions are not taken into account in /mnt/user/share folders

Recommended Posts



I do not know if it is a bug or a feature but it seems that permissions are not taken into account in /mnt/user/share folders.


I create a user named 'coder'.


As expected in the home folder:

# in /home/coder

$ ls -pla foo
---------- 1 root root 4 Mar 23 03:13 foo

$ cat foo
cat: foo: Permission denied


But in a shared folder with the same file:


# in /mnt/user/system

$ ls -pla foo
---------- 1 root root 4 Mar 23 03:12 foo

$ cat foo


It is a strange behavior.


How can I apply correct permissions in shared folders ?



Link to comment

I'd call it a feature. Unraid is designed as an appliance, not a general purpose multi-user Linux. There really is only the root user and the creation of regular users and home directories isn't supported. That doesn't stop you from doing it but, as you see, the results aren't quite what you expected. You might want to consider creating a Linux VM for that purpose.


However, having said that, there is this bug report

which may or not be relevant. I don't know if it's specifically about docker containers or more generally about the shfs user share filesystem.

Link to comment

Thank you for your answer.


I understand that Unraid is not made for that but I do not get why it fails especially on /mnt/user/share.

Is it linked to smb ?


I do not want to create a linux VM as I want to keep my resources at the maximum.

I just want a dev account to manage my docker and be able to share this account while keeping other shares private.


Link to comment

Seems like the bug is on the shfs itself.

root@MediaStore:/mnt/user/Downloads# echo x > a
root@MediaStore:/mnt/user/Downloads# chmod 600 a
root@MediaStore:/mnt/user/Downloads# ls -l a
-rw------- 1 root root 2 Mar 23 21:44 a
root@MediaStore:/mnt/user/Downloads# ls -l /mnt/cache/Downloads/a
-rw------- 1 root root 2 Mar 23 21:44 /mnt/cache/Downloads/a
root@MediaStore:/mnt/user/Downloads# cat a
root@MediaStore:/mnt/user/Downloads# su nobody -s /bin/sh
nobody@MediaStore:/mnt/user/Downloads$ cat a
nobody@MediaStore:/mnt/user/Downloads$ cat /mnt/cache/Downloads/a
cat: /mnt/cache/Downloads/a: Permission denied


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.

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.