You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does the volume on my drive need special permission or a special user / group?
Do I have to create a user for each volume or do I have to launch the docker run command with a special user?
I start the docker with the following command docker run --name teamspeak -d -p 9987:9987/udp -p 30033:30033 -p 10011:10011 -v /data/teamspeak:/teamspeak3 devalx/docker-teamspeak3:latest
If i inspect the created container the correct folder is mounted in RW mode, but on start the ts3server.ini never can be found and everytime i get error messages... ERROR: openFile( file:/teamspeak3/logs//ts3server_2016-02-18__20_38_58.281412_0.log) failed
My files are direct in the directory /data/teamspeak ...
/data/teamspeak/ts3server.ini
/data/teamspeak/ts3server.sqlitedb
...
Did u use old files from another TS3-Install or was it a "fresh" install (/data/teamspeak was empty before running the container)?
And can u maybe post an "ls -all" from your /data/teamspeak/-directory?
First at all - thank you for your fast reply.
I used the files from another TS3-Install - I wanted to keep my old configurations and the old database.
The permissions are:
So, in general you dont need to keep the complete TS3-folder and put it into the /data/teamspeak-dir, because all runtime-files of the server are meant to stay inside the actual TS3-container. (Like the startscripts)
In the current version the files are created as root by the container, so you could try to "chown -R root /data/teamspeak". (I just started today so they will not be created as root, just need some more time updating the README)
You can also try to delete the logs/-folder so the container can create it with the correct permissions himself (hopefully)
Does the server in the docker image create the folder for the logfiles inside my /data/teamspeak or in a custom folder inside the docker image?
I changed the owner to root:root, but no success - I also removed all other files but now i get a critical error. 2016-02-18 21:47:01.429623|CRITICAL|VirtualSvrMgr | | unable to start filemanager, while creating directory : files failed
But if you also dont know any more things which I can try, I will do some more research and try to fix this and will get back to you ^^
Sorry, i never tried to import old data ^^
Seems like there is still a permission problem and he cant create the files-folder now.
The container should create the logs inside your /data/teamspeak-folder (Because /teamspeak3 inside the container is mapped to it).
Mh yes, there is a problem with the permissions ... didnt see this error message until now ... mkdir: cannot create directory '/teamspeak3/files': Permission denied
In the new beta-branch i implemented an ENV-variable to set the UID of the internal user in the actual container, maybe it is of any help: sudo docker run --name=ts3 -d -e TS3_UID=1000 -v /home/devalx/docker/ts3-test:/data/ts3 devalx/docker-teamspeak3:beta
(Make sure to keep a backup of your db ;-)
Keep in mind that the parent-folder (in my example ts3-test) is writable/owned by the specific UID on the host.
Also i am not sure what happens if u specify UID 1111 and there is no actual user with UID 1111 on the host machine.
Thanks, the solution with the labels is working and is even better. Didnt see, that there is this option. docker run --name ts3 -d -p 9987:9987/udp -p 30033:30033 -p 10011:10011 -v /data/teamspeak:/teamspeak3:z devalx/docker-teamspeak3
Activity
devalx commentedon Feb 18, 2016
Did u use old files from another TS3-Install or was it a "fresh" install (/data/teamspeak was empty before running the container)?
And can u maybe post an "ls -all" from your /data/teamspeak/-directory?
raaaimund commentedon Feb 18, 2016
First at all - thank you for your fast reply.

I used the files from another TS3-Install - I wanted to keep my old configurations and the old database.
The permissions are:
raaaimund commentedon Feb 18, 2016
Here is the command I used to create your docker image.

devalx commentedon Feb 18, 2016
So, in general you dont need to keep the complete TS3-folder and put it into the /data/teamspeak-dir, because all runtime-files of the server are meant to stay inside the actual TS3-container. (Like the startscripts)
In the current version the files are created as root by the container, so you could try to "chown -R root /data/teamspeak". (I just started today so they will not be created as root, just need some more time updating the README)
You can also try to delete the logs/-folder so the container can create it with the correct permissions himself (hopefully)
raaaimund commentedon Feb 18, 2016
Does the server in the docker image create the folder for the logfiles inside my /data/teamspeak or in a custom folder inside the docker image?
I changed the owner to root:root, but no success - I also removed all other files but now i get a critical error.
2016-02-18 21:47:01.429623|CRITICAL|VirtualSvrMgr | | unable to start filemanager, while creating directory : files failedBut if you also dont know any more things which I can try, I will do some more research and try to fix this and will get back to you ^^
devalx commentedon Feb 18, 2016
Sorry, i never tried to import old data ^^
Seems like there is still a permission problem and he cant create the files-folder now.
The container should create the logs inside your /data/teamspeak-folder (Because /teamspeak3 inside the container is mapped to it).
raaaimund commentedon Feb 18, 2016
Mh yes, there is a problem with the permissions ... didnt see this error message until now ...
mkdir: cannot create directory '/teamspeak3/files': Permission denieddevalx commentedon Feb 18, 2016
In the new beta-branch i implemented an ENV-variable to set the UID of the internal user in the actual container, maybe it is of any help:
sudo docker run --name=ts3 -d -e TS3_UID=1000 -v /home/devalx/docker/ts3-test:/data/ts3 devalx/docker-teamspeak3:beta(Make sure to keep a backup of your db ;-)
Keep in mind that the parent-folder (in my example ts3-test) is writable/owned by the specific UID on the host.
Also i am not sure what happens if u specify UID 1111 and there is no actual user with UID 1111 on the host machine.
raaaimund commentedon Feb 18, 2016
I figured out why i got problems with my permissions.
I use fedora server as host system and fedora has SElinux enabled.
Here I found the solution.
https://linuxconfig.org/how-to-share-data-between-a-docker-container-and-host-system-using-volumes
I have to create the docker image with the
--privileged=trueflag.Now everything works like a charm 👍
Thank you very much for your help @devalx
devalx commentedon Feb 19, 2016
You are welcome, thank you for sharing the solution!
I never used them but maybe the :z|:Z options help you in this case too and you dont need to privilige the whole container, see https://docs.docker.com/engine/userguide/containers/dockervolumes/
raaaimund commentedon Feb 19, 2016
Thanks, the solution with the labels is working and is even better. Didnt see, that there is this option.
docker run --name ts3 -d -p 9987:9987/udp -p 30033:30033 -p 10011:10011 -v /data/teamspeak:/teamspeak3:z devalx/docker-teamspeak3Thank you very much
updated link to issue #6 to devalx's repo