needo37 / deluge

Docker for deluge
1 stars 10 forks source link

Permission denied when mounting volumes #3

Open Caroga opened 8 years ago

Caroga commented 8 years ago

Hi, I'm fairly new to this but I cannot get my head around the following issue:

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
No SSH host key available. Generating one...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
invoke-rc.d: policy-rc.d denied execution of restart.
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 94
Traceback (most recent call last):
  File "/usr/bin/deluged", line 9, in <module>
    load_entry_point('deluge==1.3.12', 'console_scripts', 'deluged')()
  File "/usr/lib/python2.7/dist-packages/deluge/main.py", line 184, in start_daemon
    deluge.log.setupLogger(level=options.loglevel, filename=options.logfile)
  File "/usr/lib/python2.7/dist-packages/deluge/log.py", line 65, in setupLogger
    filemode=filemode
  File "/usr/lib/python2.7/logging/__init__.py", line 1532, in basicConfig
    hdlr = FileHandler(filename, mode)
  File "/usr/lib/python2.7/logging/__init__.py", line 903, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 928, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/config/deluged.log'
Traceback (most recent call last):
  File "/usr/bin/deluge-web", line 9, in <module>
    load_entry_point('deluge==1.3.12', 'console_scripts', 'deluge-web')()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/web.py", line 138, in start
    web.start()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/web.py", line 108, in start
    self.__server = server.DelugeWeb()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/server.py", line 630, in __init__
    self.top_level = TopLevel()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/server.py", line 488, in __init__
    self.putChild("tracker", Tracker())
  File "/usr/lib/python2.7/dist-packages/deluge/ui/web/server.py", line 197, in __init__
    self.tracker_icons = TrackerIcons()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/tracker_icons.py", line 159, in __init__
    os.makedirs(self.dir)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/config/icons'

This happens after building the image from you dockerfile and running it with the following command: docker run -d --name="deluge" -v /data/downloads/config:/config -v /data/downloads/complete:/downloads -v /etc/localtime:/etc/localtime:ro -p 8112:8112 -p 58846:58846 deluge

/data/downloads is writable as the owner and group are mine. Chmodding /data/downloads to 777 recursively does not seem to help either. Any idea what I am doing wrong or missing? Thank you in advance!

needo37 commented 8 years ago

What are the permissions on /data/downloads/config ?

Caroga commented 8 years ago

caroga:caroga 777. I'm using one of your other docker instances as well (nzbget) and this one is working with the same configuration. It has successfully wrote his configuration inside the config folder.

Oliph commented 7 years ago

I have the same problem. I receive IOError: [Errno 13] Permission denied: '/config/deluged.log' and that for every files the script is supposed to create. The permission on my config folder is 776. I tried to use the env DELUGED_USER=myusername but then it said setuser: user myusername not found when I launch the container