May 24, 20251 yr I have Unraid 7.0.1 running on a Dell T440. I have Debian 12 running as a VM in Unraid.Debian boots off an SSD configured in Unraid as a Cache.I want the primary file system for Debian to be on the array. It all works as expected, except I do not have read/write access.I have created a Share in the array called "linux" and set it as Private under SMBI have a user for the linux VM and have given it read/write permission for the linux share.I have mounted the share in the linux vm by adding this line to fstab://T440.local/linux /mnt/linux cifs rw,relatime,vers=3.1.1,credentials=/etc/samba/servershare.conf,uid=0 0 0/etc/samba/servershare.conf contains the credentials.When I access /mnt/linux from the linux vm, it is read-only.I can access the linux share on the unraid array as read/write from a Windows machine. I copied some files to the linux share for testing.When I list the files in the linux share from the linux vm (ls /mnt/linux), they show user and group as "root".When I list the files from an SSH terminal in Unraid, the user is the Windows username and the group is "users".I tried sudo chown to change the files to the linux user name, but it has no effect.How can create a Linux filesystem on my Array with read/write access for my Debian 12 VM ? Edited May 24, 20251 yr by timg11
May 24, 20251 yr Author Solution I think I figured it out. The uid was incorrect. This line in fstab appears to work://T440.local/linux /mnt/linux cifs rw,credentials=/etc/samba/servershare.conf,uid=1000 0 0Using UID=0 means root, which does not seem to allow R/W. UID=1000 is the first user on the Debian system, which then shows files on the share as:-rwxr-xr-x 1 debianuser root 6 May 24 11:36 test1.txt
June 21, 20251 yr If you want it to work with Samba/SBM, you need the 'Group' to be "users" and the permissions should be 666 for files and 777 for directories. (Your having the execute bit set on a text file is not a good practice from a Linux security standpoint!) See here:https://forums.unraid.net/topic/188600-share-permissions-changed-to-owner-99/#findComment-1540351 Your owner, debianuser, is fine for SMB access as Unraid as every Share access user setup using Unraid GUI is a member of 'users'. However, if there are files in these shares written by something besides your VM, you will have to make sure that your Debian user is a member of the Unraid group 'users' if you want access to those files via your VM. (In a secure SMB environment, SMB access to files is via the group permissions rather than through the owner!) I do not use VM's so I can not provide more information then this. One more thing, 'root' is is invalid user in SMB (security issues),
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.