You are not logged in.
Hi,
i recently built a NAS with some shared folders, using OpenMediaVault.
Configuration of the NAS is fine, the folder are accessible and the credentials work.
BUT - i struggle with mounting the shares via fstab.
I use /mnt for mountpoints. I can only create folders there with root, but in the past i was able to do a simple chown and i was the owner.
Now when i do this after a reboot the folder is owned by root again...
Oh yes, and the credentials are not being passed somehow (yes, double checked for typos in fstab) so i need to re-enter every time i access the folder.
So, mounting per se works, but the i cannot change the ownership of the mountpoints, thus can only read the shared folder.
Here are the fstab entries:
19:42:59 chris@chrisarch ~ $ cat /etc/fstab
#NAS OMV ChristianPrivat
//omv.local/ChristianPrivat /mnt/NAS_ChristianPrivat cifs username=xxx,password=yyy,x-systemd.automount,defaults,nofail,x-systemd.device-timeout=1 0 2
#NAS OMV Dokumente
//omv.local/Dokumente /mnt/NAS_Dokumente cifs username=xxx,password=yyy,x-systemd.automount,defaults,nofail,x-systemd.device-timeout=1 0 2
#NAS OMV FotosVideos
//omv.local/FotosVideos /mnt/NAS_FotosVideos cifs username=xxx,password=yyy,x-systemd.automount,defaults,nofail,x-systemd.device-timeout=1 0 2
#NAS OMV Sonstiges
//omv.local/Sonstiges /mnt/NAS_Sonstiges cifs username=xxx,password=yyy,x-systemd.automount,defaults,nofail,x-systemd.device-timeout=1 0 2
19:49:58 chris@chrisarch ~ $ mount - why does systemctl add all these arguments i did not specify in fstab?
19:51:31 chris@chrisarch ~ $ mount | grep NAS
systemd-1 on /mnt/NAS_ChristianPrivat type autofs (rw,relatime,fd=59,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10307)
systemd-1 on /mnt/NAS_Dokumente type autofs (rw,relatime,fd=61,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10313)
systemd-1 on /mnt/NAS_FotosVideos type autofs (rw,relatime,fd=63,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10319)
systemd-1 on /mnt/NAS_Sonstiges type autofs (rw,relatime,fd=64,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10325)
//omv.local/FotosVideos on /mnt/NAS_FotosVideos type cifs (rw,relatime,vers=3.1.1,cache=strict,username=xxx,uid=0,noforceuid,gid=0,noforcegid,addr=x.x.x.x,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,reparse=nfs,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1,x-systemd.automount)
//omv.local/Dokumente on /mnt/NAS_Dokumente type cifs (rw,relatime,vers=3.1.1,cache=strict,username=xxx,uid=0,noforceuid,gid=0,noforcegid,addr=x.x.x.x,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,reparse=nfs,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1,x-systemd.automount)ownership inside /mnt
19:53:15 chris@chrisarch /mnt $ ls -la
drwxr-xr-x 11 root root 4096 29. Nov 10:45 .
drwxr-xr-x 17 root root 4096 26. Nov 08:13 ..
drwxr-xr-x 2 root root 0 4. Dez 19:23 NAS_ChristianPrivat
drwxr-xr-x 2 root root 0 1. Dez 15:58 NAS_Dokumente
drwxr-xr-x 2 root root 0 29. Nov 11:21 NAS_FotosVideos
drwxr-xr-x 2 root root 0 4. Dez 19:23 NAS_Sonstiges
drwxr-xr-x 7 chris users 4096 6. Apr 2024 mediaAll folders inside / are owned by root:root.
What can i do?
Offline
I use /mnt for mountpoints. I can only create folders there with root, but in the past i was able to do a simple chown and i was the owner.
Was that as root?
Now when i do this after a reboot the folder is owned by root again...
Oh yes, and the credentials are not being passed somehow (yes, double checked for typos in fstab) so i need to re-enter every time i access the folder.
If you unmount one of the shares can you change the ownership of its former mount point then with chown? If you disable that mount in the fstab and reboot is its ownership preserved?
Last edited by loqs (2024-12-04 19:53:40)
Offline
Was that as root?
Probably, yes. I do have another mount that has been setup after the initial setup - my internal media HDD. I have added this in fstab via the UUID, without any systemd-related arguments. This mount gets not "garbled up" as seen with my NAS-mounts, see above.
If you unmount one of the shares can you change the ownership of its former mount point then with chown? If you disable that mount in the fstab and reboot is its ownership preserved?
Hm, its getting worse. After unmounting one of the shares i was able to perform chown and chgrp via sudo - no error messages - but the ownership and group of this folder did not change at all. Still root:root. I am at a loss.
Does erasing the fstab entries also erase the systemd-entries for these shares as seen in the mount-command? Guess i need to do systemctl daemon-restart? Then i maybe could start from scratch with these mounts.
But i do not know what was the mistake here. Anybody see anything wrong mit the fstab-entries for the NAS-shares?
Offline
I did some fiddling around. I recognized that the normal umount did not really unmount.
So i did systemd-umount, which really unmounted the folders, resulting in... the correct and intended ownership --> chris:users instead of root:root
Atfer reboot or invoked remount via systemd, the folder permissions of the directories in /mnt/ change to root:root.
I have no idea how to proceed... this drives me nuts ![]()
/edit: OH! It seems like file_mode=0777,dir_mode=0777 did the trick. Yes, it means full access to everybody, but only me and my SO have access to the NAS anyways.
/edit2: 1 day later - it survived a reboot --> success. Can be closed.
Last edited by nexx1 (2024-12-15 19:03:02)
Offline