I tried that.
root@Mreza:~# id
uid=0(root) gid=0(root) groups=0(root)
and added to the jrivermc27 stack:
version: "2"
services:
jrivermc27:
image: shiomax/jrivermc27
container_name: jrivermc27
restart: always
network_mode: host
cap_add:
- NET_ADMIN # This runs the container with raised privileges
environment:
- TZ=America/Los_Angeles
- VNC_PASSWORD=12345
#- USER_ID=0
#- GROUP_ID=0
- PUID=0
- PGID=0
volumes:
id without anything shows you the id of the user you are logged in as (so in your case root) you can id <username> to show the once for a different user. It was never the intention to run jriver as root user... quite the opposite, not sure if that´s supposed to work, never tried. But wether it does or doesn´t it´s a bad idea to run everything as root.
Try to run ls -la on the folder you are trying to access then id <user_that_you_found> and use that id instead of 0.
Also, any particular reason why you added this?
cap_add:
- NET_ADMIN # This runs the container with raised privileges
Either way assuming User 1001 exists and is the one that owns your Music directory and who should own it you can run
sudo chown -R 1001:1001 /path/to/folder
sudo chmod -R 750 /path/to/folder
sudo find /path/to/folder -type d -exec sudo chmod +x {} \;
This will make all the sub-files and sub-folders owned by user 1001 and group 1001. The second one sets access rights to all the files and folders there to 750 so (read/write/execute for user) (read/execute for group) and nothing for everyone else.
The last one makes all folders executeable. Not strictly necessary here. But if you want to have a readonly user they need executeable permissions on the directories to be able to browse the directory. They would not need execute permissions on anything else though.
You can also replace 1001 here with the username of that user, but since I don´t know usernames on your system and in the first post you typed 1001 I stuck with that for the explanation.