spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
259 stars 57 forks source link

supysonic-daemon as normal user #239

Closed jimToo closed 1 year ago

jimToo commented 1 year ago

Hi, I am able to run supysonic-server temporary as a non-root user without issues:

But supysonic-daemon as non-root user exits with Permission Error.


Traceback (most recent call last):
  File "/home/sonic/.local/bin/supysonic-daemon", line 8, in <module>
    sys.exit(main())
  File "/home/sonic/.local/lib/python3.9/site-packages/supysonic/daemon/__init__.py", line 63, in main
    daemon.run()
  File "/home/sonic/.local/lib/python3.9/site-packages/supysonic/daemon/server.py", line 51, in run
    self.__listener = Listener(
  File "/usr/lib/python3.9/multiprocessing/connection.py", line 453, in __init__
    self._listener = SocketListener(address, family, backlog)
  File "/usr/lib/python3.9/multiprocessing/connection.py", line 596, in __init__
    self._socket.bind(address)
PermissionError: [Errno 13] Permission denied```

Is there a possibility to run the daemon as normal user?
spl0k commented 1 year ago

Hello.

Both the server and the daemon can be run as any user. The error you are facing might be due to an incorrect configuration. Check the socket value of the [daemon] section in your configuration. It should be the path to a Unix-domain socket. Before starting the daemon check that this file doesn't exist, that the folder it would reside in exists and that the user that will run the daemon can write to this folder.

Hope this helps.

jimToo commented 1 year ago

Thanks! The unix-socket was not writeable by the user! :)