Permissions denied. Cannot understand why.

    • OMV 2.x
    • Resolved
    • Permissions denied. Cannot understand why.

      I have tried to fix this problem for a while now and I do not understand why this cant be done. SickRage cannot copy files to a share (log error further down).

      For a short while I thought it worked but now the problem is back. I have restarted OMV at least once.
      Could it be related to this error I get when I try to add a folder to my zfs pool?

      Source Code

      1. ​Error #6000:
      2. exception 'OMVException' with message 'Failed to mount 'media': mount: can't find /mnt in /etc/fstab or /etc/mtab' in /usr/share/openmediavault/engined/module/fstab.inc:90
      3. Stack trace:
      4. #0 /usr/share/openmediavault/engined/rpc/config.inc(206): OMVModuleFsTab->startService()
      5. #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      6. #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      7. #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      8. #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      9. #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      10. #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      11. #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      12. #8 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      13. #9 {main}
      Display All


      Could it be that the error with fstab is caused by some permission problem? And that makes all my changes only work for this session and be reverted after a restart?

      How can I fix this so all members in the Users group (that Sickrage should be a part of) can read and write in all shares? I can use these folders from all other computers on my network, even from my Android box running Kodi (adding Subtitles). That makes me think this must be a OMV problem.

      Both these shares are added with "Remote Share" plugin. One is placed on a Buffalo Nas and the other is on a Windows 10 machine. I can read and write

      Source Code

      1. ​2015-12-13 09:03:35 POSTPROCESSER::Unable to copy file /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/nyheter/tv/Scorpion.S02E11.HDTV.x264-LOL/scoprion.211.hdtv-lol.mp4 to /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/share/share/TV3/Scorpion/Season 02/Scorpion - S02E11 - The Old College Try.mp4: error 13 : Permission denied
      2. 2015-12-13 09:03:34 POSTPROCESSER::Unable to copy file /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/nyheter/tv/NCIS.Los.Angeles.S07E10.HDTV.x264-LOL/ncis.los.angeles.710.hdtv-lol.mp4 to /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/FilmTV/TV/NCIS Los Angeles/Season 07/NCIS Los Angeles - S07E10 - Internal Affairs.mp4: error 13 : Permission denied
    • cat /proc/mounts

      Source Code

      1. rootfs / rootfs rw 0 0
      2. sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
      3. proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
      4. udev /dev devtmpfs rw,relatime,size=10240k,nr_inodes=497177,mode=755 0 0
      5. devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
      6. tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=406064k,mode=755 0 0
      7. /dev/disk/by-uuid/ddb64aef-eed8-45bc-a6cd-28e758581111 / ext4 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0
      8. tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
      9. tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=1454560k 0 0
      10. /dev/md0 /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08 xfs rw,noexec,relatime,attr2,delaylog,inode64,usrquota,grpquota 0 0
      11. /dev/sdc1 /media/6484d924-0de7-4ffb-9d68-954d02e36c5b xfs rw,noexec,relatime,attr2,delaylog,inode64,usrquota,grpquota 0 0
      12. rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
      13. //RT-N66U/usb3tb /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/usb3tb cifs rw,relatime,sec=ntlm,unc=\\RT-N66U\usb3tb,username=admin,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.1,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,actimeo=1 0 0
      14. //SERVER/FilmTV /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/FilmTV cifs rw,relatime,sec=ntlm,unc=\\SERVER\FilmTV,username=server,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.224,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1 0 0
      15. //SERVER/OldWin7 /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/oldwin7 cifs rw,relatime,sec=ntlm,unc=\\SERVER\OldWin7,username=server,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.224,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1 0 0
      16. //SERVER/TV /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/TVserier cifs rw,relatime,sec=ntlm,unc=\\SERVER\TV,username=server,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.224,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1 0 0
      17. //LS-WVLA93/SHARE /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/share cifs rw,relatime,sec=ntlm,unc=\\LS-WVLA93\SHARE,username=admin,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.121,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1 0 0
      18. //SERVER/Big\040Disc /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/BigDisc cifs rw,relatime,sec=ntlm,unc=\\SERVER\Big Disc,username=server,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.224,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1 0 0
      19. media-ior /media-ior zfs rw,relatime,xattr,noacl 0 0
      20. media-ior/puh /media-ior/puh zfs rw,relatime,xattr,noacl 0 0
      Display All


      cat /etc/fstab

      Source Code

      1. # /etc/fstab: static file system information.
      2. #
      3. # Use 'blkid' to print the universally unique identifier for a
      4. # device; this may be used with UUID= as a more robust way to name devices
      5. # that works even if disks are added and removed. See fstab(5).
      6. #
      7. # <file system> <mount point> <type> <options> <dump> <pass>
      8. # / was on /dev/sda1 during installation
      9. UUID=ddb64aef-eed8-45bc-a6cd-28e758581111 / ext4 errors=remount-ro 0 1
      10. # swap was on /dev/sda5 during installation
      11. UUID=7ddb896d-29ca-4d21-93f5-bbefbb71f531 none swap sw 0 0
      12. /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
      13. # >>> [openmediavault]
      14. UUID=a6eceb29-64d8-48b4-8703-1f79c9c59f08 /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08 xfs defaults,nofail,noexec,usrquota,grpquota,inode64 0 2
      15. UUID=6484d924-0de7-4ffb-9d68-954d02e36c5b /media/6484d924-0de7-4ffb-9d68-954d02e36c5b xfs defaults,nofail,noexec,usrquota,grpquota,inode64 0 2
      16. //RT-N66U/usb3tb /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/usb3tb cifs username=admin,password=[pwd],sec=ntlm,_netdev,iocharset=utf8 0 0
      17. //SERVER/FilmTV /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/FilmTV cifs username=server,password=[pwd],sec=ntlm,_netdev,iocharset=utf8 0 0
      18. //SERVER/OldWin7 /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/oldwin7 cifs username=server,password=[pwd],sec=ntlm,_netdev,iocharset=utf8 0 0
      19. //SERVER/TV /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/TVserier cifs username=server,password=[pwd],sec=ntlm,_netdev,iocharset=utf8 0 0
      20. //LS-WVLA93/SHARE /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/share cifs username=admin,password=[pwd],sec=ntlm,_netdev,iocharset=utf8 0 0
      21. //SERVER/Big\040Disc /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/BigDisc cifs username=server,password=[pwd],sec=ntlm,_netdev,iocharset=utf8 0 0
      22. /media-ior/puh/puh /export/puh none bind 0 0
      23. # <<< [openmediavault]
      Display All


      id sickbeard
      uid=113(sickbeard) gid=100(users) groups=100(users),1000(Home)

      The post was edited 1 time, last by 7ore ().

    • Try change some options in /etc/fstab in some cifs mounts like FilmTVusername=server,password=[pwd],gid=100,file_mode=0775,dir_mode=0775,sec=ntlm,_netdev,iocharset=utf8Unmount the remote share umount -l /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/FilmTV

      run mount -a

      go to the directory run

      sudo -u sickbeard mkdir /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/FilmTV/test_folder

      If is ok, then sickbeard should work.
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server

      The post was edited 1 time, last by subzero79 ().

    • No. I have still got problems. One is Permission denied and the other Operation not permitted.

      Source Code

      1. 2015-12-15 06:57:00 POSTPROCESSER::Unable to move file /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/nyheter/tv/The.Expanse.S01E01.720p.HDTV.x264-BATV/The.Expanse.S01E01.720p.HDTV.x264-BATV.mkv to /media/TVserier3/The Expanse/Season 01/The Expanse - S01E01 - Dulcinea.mkv: error 1 : Operation not permitted
      2. 2015-12-15 06:54:23 POSTPROCESSER::Unable to move file /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/nyheter/tv/Scorpion.S02E12.HDTV.x264-LOL/scorpion.212.hdtv-lol.mp4 to /media/TVserier2/Scorpion/Season 02/Scorpion - S02E12 - Dam Breakthrough.mp4: error 13 : Permission denied


      The "Operation not permitted" seems to be the deletion part that fails, as the file is in place on the target drive. And when I look at ACL the user group have R/W/E permissions.

      The other one is from a remote share and When I look at that one in ACL the group is root and the permissions are R/E. And when I try to change it from the UI I get a long exception starting with:

      Source Code

      1. Failed to execute command 'export LANG=C; setfacl --remove-all --recursive -M '/tmp/setfaclLVBAVh' -- '/media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/share/' 2>&1': setfacl: /media/a6eceb29-64d8-48b4-8703-1f79c9c59f08/data/tools/mnt/share/: Operation not supported


      Is this the reason? I can reach that drive from other machines and I can create and delete files just fine.
    • You cannot apply acl to remote shares. Permissions are better to be resolved at the remote host.
      Have you actually examined the folders and how they look inside with permissions the current folder and the one on above? there is a utility in the repo called tree that can help you display better ownership and permissions.
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server