Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission denied for /config/...when starting plexmediaserver #2

Open
christoth opened this issue Jun 28, 2014 · 8 comments
Open

permission denied for /config/...when starting plexmediaserver #2

christoth opened this issue Jun 28, 2014 · 8 comments

Comments

@christoth
Copy link

The service can write the config files into the volume. The directory is a sub-dir under my user home - non-root ownership.
-v /home/chris/plex/config:/config

@needo37
Copy link
Owner

needo37 commented Jun 28, 2014

This is due to the permissions on the unRAID server of where you are pointing /config

@christoth
Copy link
Author

The host is Ubuntu 14.04 server.
What should I set permissions to?

@needo37
Copy link
Owner

needo37 commented Jun 28, 2014

Aha, my apologies. Most of my users are on unRAID. Can you share with me the current permissions of your Plex directory?

@christoth
Copy link
Author

No worries.

I just changed the permissions of the config directory (on the host) to 766 to test the permissions issues and I still get the permissions exception from pms when it tries to write to the log under /config in the container.

I stopped the prior instance of the image and removed it before running each test to wipe any pre-existing artifacts...

Nothing is created/written under config

@christoth
Copy link
Author

I also tried starting a data volume and using -volumes-from and still got the following exception:

Aborted (core dumped)
6 3000 /config/Library/Application Support
8192
terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
what(): boost::filesystem::create_directories: Permission denied: "/config/Library/Application Support/Plex Media Server"

using the following docker commands:
sudo docker run -d -v /config --name="plex-data" phusion/baseimage
sudo docker run -d --net="host" --name="plex" --volumes-from plex-data -v /mnt/nas/media/video:/data -v /etc/localtime:/etc/localtime:ro -e VERSION=0.9.9.12.504-3e7f93c -p 32400:32400 needo/plex

@christoth
Copy link
Author

FYI, I just tried timhaak's docker-plex image and it writes to the /config volume without issues.

@needo37
Copy link
Owner

needo37 commented Jun 30, 2014

That is due to his running as the user root and mine runs as the user plex.

@nathanhinish
Copy link

@needo37 I'm not sure if this is cleared up elsewhere (Docker Hub maybe?) but my fix is pretty simple...

Create a plex.sh file with the following:
#!/bin/bash
start_pms

In your docker run ... command, map the file
-v /path/to/plex.sh:/etc/service/plex/run

I've also done this for your sickbeard and couchpotato repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants