Krisjjrice Posted February 1, 2022 Share Posted February 1, 2022 Hi, So in an attempt to implement some sort of user share quotas, I make several .img files for each user, each with a filesystem on them, setup as such: made using dd if=/dev/zero of=/mnt/user/user_area/user_images/${username}.img bs=1M count=102400 (100GB) mkfs.exfat /mnt/user/user_area/user_images/${username}.img an entry is then added into /boot/config/custom_theme/custom_fstab, which is copied by a script that's called by the go file. Once the system is up and running, I can do mount -a and all the image files successfully mount. On the user end, the shares report 100GB free space and works brilliantly. After 3 days, I noticed my log partition was full. In syslog, I'm getting the error "emhttpd error: share_luks_status, 5995: Operation not supported (95): getxattr" After some reseearch, I have disabled logging in Samba to try and ignore this error but it seems emhttpd is logging and not samba. I also tried adding user_xattr in ftsab for each mount, using ext4 rather than exfat, but still the same error filling the logs. I would like to know if there is a way do disable this particular error being logged, or is there something I am missing to get the getxattr working so the error is fixed? Thanks! Quote Link to comment
Squid Posted February 1, 2022 Share Posted February 1, 2022 Anything mounted within /mnt/user the OS expects to have full control over. You're better off mounting them instead within /mnt/disks Quote Link to comment
Krisjjrice Posted February 1, 2022 Author Share Posted February 1, 2022 How would i get this working with Samba and the user access control through the GUI? Was probably worth mentioning I tried making a /mnt/disks/${username}, mounting the .img file there instead then doing a ln -ls /mnt/disks/${username} /mnt/user/${username} but this has the same results Quote Link to comment
Squid Posted February 1, 2022 Share Posted February 1, 2022 You would add in appropriate entries to smb-extra.conf on the flash drive (/config). The symlink has the same result for the same reason. It's not under the OS control. Quote Link to comment
Krisjjrice Posted February 1, 2022 Author Share Posted February 1, 2022 Hi @Squid so i tried this, i copied all the entries for all the user shares from /etc/samba/smb-shares.conf into /boot/config/smb-extras.conf, changed the paths to /mnt/disks/${username} with no luck. Samba now isn't loading the shares, I cannot mount them from the user end and they have disappeared from the shares page on unraid. However they do exist in /mnt/disks/${username} Any suggestions? They have successfully copied into /etc/samba/smb-extra.conf as well but seems samba is ignoring it? Quote Link to comment
Squid Posted February 1, 2022 Share Posted February 1, 2022 Shares on the shares page are only what the OS handles. Symlinking or direct mounts within it is always going to be troublesome at best and will also potentially have other issues (inability to stop the array?) Within smb-extra.conf you need to add a section akin to [MYIMG] path=/mnt/disks/whateverhere valid users = andrew write list = andrew force user = root A reboot (or a change to a share setting) will result in MYIMG being shared over the network. Quote Link to comment
Krisjjrice Posted February 1, 2022 Author Share Posted February 1, 2022 (edited) I have added the following: [username] path=/mnt/disks/username comment = user-full-name browseable = no # Private writeable = no read list = write list = username valid users = username case sensitive = auto preserve case = yes short preserve case = yes I have added these sections for each username into the smb-extra file, and have rebooted. I can see the entries in the SMB Extras tab under Settings -> SMB, and they are in /etc/smb-extra.conf. However, on the Shares page, they are no longer there? They are also not accessible over the network Edited February 1, 2022 by Krisjjrice Quote Link to comment
itimpi Posted February 1, 2022 Share Posted February 1, 2022 Samba shares added via the smb-extra file will not show up on the Unraid Shares tab. They should, though I would have thought, be accessible over the network. Probably something that is permissions related or an error in the samba settings you used. Quote Link to comment
Squid Posted February 1, 2022 Share Posted February 1, 2022 3 minutes ago, Krisjjrice said: However, on the Shares page, they are no longer there? 9 minutes ago, Squid said: Shares on the shares page are only what the OS handles. Not going to pretend to be an samba options guru, but you've got browseable = no, writeable=no and no users being allowed to read and a type in write list (wtite list) Quote Link to comment
Krisjjrice Posted February 1, 2022 Author Share Posted February 1, 2022 I copied the entries that were put into /etc/smb.conf when I created the shares through the unraid page into /boot/config/smb-extras.conf so they are exactly as set up by the system by default, the only modification I made was to the path. I have just done an ls -lah in /mnt/disks and they are all root:root, whereas in /mnt/user/ they are all nobody:users I think this might be the issue, but doing a chown gives me "Operation not permitted" after mounting the img Quote Link to comment
Krisjjrice Posted February 1, 2022 Author Share Posted February 1, 2022 Ok i got this working Did a id nobody to get UID and GID of the nobody user, added umask=0000,uid=99,gid=100 into the fstab, rebooted and mounted the img files and bam its accessible over the network. Thanks for all your help. On another note, is there anyway to make these shares manageable through the webpage? The idea of my company moving to unraid was that everything was GUI controlled with little-to-no CLI setup, and would preferably like to try and keep it this way. Thanks again! Quote Link to comment
Squid Posted February 1, 2022 Share Posted February 1, 2022 13 minutes ago, Krisjjrice said: is there anyway to make these shares manageable through the webpage? No Your other option is to investigate if you can do this via Unassigned Devices. I don't believe so, but @dlandon is the expert on what UD can and can't do. One thing you do want to also try is can you stop the array successfully with that image file being opened and effectively mounted. You may need to add a script (/config/stopping) on the flash drive to remove that mount so the array can successfully stop Quote Link to comment
dlandon Posted February 2, 2022 Share Posted February 2, 2022 On 2/1/2022 at 8:17 AM, Squid said: I don't believe so, Correct, UD isn't able to do this, Quote Link to comment
Recommended Posts
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.