mdhiggins / sma-mod

MIT License
7 stars 2 forks source link

Permission Issue #8

Closed Minds3t closed 2 years ago

Minds3t commented 2 years ago

When running the main container, sabnzbd for example, with a user and group id other than root, 1000:32574 in my case, the mod fails to create the virtual python environment. The .cache and subdirectories are owned by the user abc. It also doesn't help if I chown the the folders ouside of docker before creating the container, seems like the permission gets reset after creation.

[90-sma-config] Creating python virtual environment and installing requirements

WARNING: The directory '/config/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Minds3t commented 2 years ago

Ok, a workaround I found was putting /config/.cache inside a separate docker volume

Minds3t commented 2 years ago

Sadly not a universal fix. Issue still occurs on qbittorrent

mdhiggins commented 2 years ago

I believe this error does not impact functionality

Minds3t commented 2 years ago

I does. I get SystemExit: 1

mdhiggins commented 2 years ago

1000:32574 is that abc:abc (uid:gid)?

mdhiggins commented 2 years ago

Also could you post the full logs

That error is just a warning and it should fall back to just not using the cache which is a non fatal warning so I'm thinking something else is triggering the exit if you're seeing that

Also what permissions does your /config mounted volume have relevant to the user you're using to launch the docker container?

mdhiggins commented 2 years ago

I pushed a small update to sma-mod to include the --no-cache-dir parameter on the off chance my interpretation is incorrect so you can try that to see if it helps, I don't have high hopes though cause the error should be falling back to that parameter anyway

Minds3t commented 2 years ago

Yes, directory on the host is owned by 1000:32574 and the container is run with PUID=1000 PGID=32574. I don't have the logs anymore but your update seems to have fixed it :-)