teamspeak-linux-docker-images icon indicating copy to clipboard operation
teamspeak-linux-docker-images copied to clipboard

Permissions get set to 9987 user every time i start the container

Open rusagent opened this issue 4 years ago • 3 comments

Hey guys,

this is how it looks like:

masteruser@mainframe:/opt/sinusbot$ sudo chown -R root:root . masteruser@mainframe:/opt/sinusbot$ ls -la total 24 drwxr-xr-x 5 root root 4096 Apr 2 01:54 . drwxr-xr-x 8 root root 4096 Mar 28 22:15 .. drwxr-xr-x 7 root root 4096 Apr 2 01:35 data -rw-r--r-- 1 root root 708 Apr 2 01:53 docker-compose.yml drwxr-xr-x 2 root root 4096 Apr 2 01:49 scripts drwxr-xr-x 9 root root 4096 Apr 2 01:53 teamspeak masteruser@mainframe:/opt/sinusbot$ sudo docker-compose down Stopping teamspeak ... done Stopping sinusbot ... done Removing teamspeak ... done Removing sinusbot ... done Removing network sinusbot_tsnetwork masteruser@mainframe:/opt/sinusbot$ sudo docker-compose up -d Creating network "sinusbot_tsnetwork" with driver "bridge" Creating teamspeak ... done Creating sinusbot ... done masteruser@mainframe:/opt/sinusbot$ ls -la total 24 drwxr-xr-x 5 root root 4096 Apr 2 01:54 . drwxr-xr-x 8 root root 4096 Mar 28 22:15 .. drwxr-xr-x 7 root root 4096 Apr 2 01:35 data -rw-r--r-- 1 root root 708 Apr 2 01:53 docker-compose.yml drwxr-xr-x 2 root root 4096 Apr 2 01:55 scripts drwxr-xr-x 9 9987 root 4096 Apr 2 01:53 teamspeak

Why are the permissions always changed and don't stay with root?

rusagent avatar Apr 01 '20 23:04 rusagent

Because teamspeak will not run as root (as it should) and thus has to change the permissions to be able to operate: https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/blob/master/alpine/entrypoint.sh#L4

You should be able to set another uid (!=0), though.

lub avatar Apr 08 '20 07:04 lub

You should be able to set another uid (!=0), though.

The Dockerfile would need to take environment variables for this into account, e. g. PUID for the user ID and PGID for the group ID. https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/blob/master/alpine/Dockerfile#L5-L6

I'd be happy to see this implemented.

Pupskuchen avatar Apr 14 '20 11:04 Pupskuchen

Cross-ref: issue #51

csware avatar Jan 04 '21 12:01 csware