Can't delete files created by Docker user

  • I know the answer to this is going to be something very simple, but I couldn't a clear way forward by googling it. I'm a bit reluctant to try a bunch of changes without knowing what I'm doing..


    I have a new install of OMV5. I set it up using the PDF guide, all good. I can access my shared folders from a windows PC. I can copy, move, delete files on the shares ok. I learned about Docker and Portainer as well. Part of that was setting up a dedicated user for Docker, I called that user Docker1. I've got SABNZB running in Portainer and used the Docker1 user when I set that up. It all works fine.

    When a download completes I can't delete the file from the shared folder. I get the error " File Access Denied - you require permission from unix user\docker1 "


    Can someone please point me the right direction?

  • In your docker container configuration try setting an environment variable UMASK=000

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • It only works for new files downloaded after you made the change and restarted the container. Have you done all that?


    Post the permissions on the file using this command in the shell:


    ls -al filename

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • It only works for new files downloaded after you made the change and restarted the container. Have you done all that?

    Yes. I deleted everything from my completed downloads folder using the CLI. In portainer I stopped the container, edited the stack and added the environment variable you suggested, saved the stack. The container is then up and running.

    I then downloaded a new file and could not delete it from the Windows share.



    ls -al filename

    Code
    ls -al 36d02fa1f9bc4be8a1c01970535517a4.mkv
    -rw-r--r--+ 1 docker1 users 528355946 May 31 00:21 36d02fa1f9bc4be8a1c01970535517a4.mkv
  • I found the answer. It was a setting in SABNZB. Folders / advanced. PERMISSIONS FOR COMPLETED DOWNLOADS. I changed the setting from nil (blank) to 777 and that's fixed it.


    Apologies for the false alarm. The error message made think it was a OMV folder or user permissions issue..

  • I found the answer. It was a setting in SABNZB. Folders / advanced. PERMISSIONS FOR COMPLETED DOWNLOADS. I changed the setting from nil (blank) to 777 and that's fixed it.


    Apologies for the false alarm. The error message made think it was a OMV folder or user permissions issue..

    I'm not a fan of 777, and would rather just set permissions properly.. but I guess if you're happy.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!