Solved Deluge with a custom user: 'fopen', 'Permission denied'

I have problems creating a user that can run the Deluge daemon properly. I've created a system user that is supposed to run deluged.
pw adduser deluge -d /usr/local/etc/deluge/home -s /usr/sbin/nologin -c "Deluge daemon"
Afterwards I added deluged_user="deluge" to my rc.conf and started the service. The service starts without an error but it's not running.
If I look up the deluged.log in /var/tmp I find this error.
Code:
[ERROR   ] 10:25:54 rpcserver:378 [('system library', 'fopen', 'Permission denied'), ('BIO routines', 'FILE_CTRL', 'system lib'), ('SSL routines', 'SSL_CTX_use_certificate_file', 'system lib')]

fopen is a C library, so I have no idea how I can grant that user access to it. Did I do something wrong while creating the user? How should I create such a user?
 
Does it use an SSL certificate? Check the permissions on the private key of that certificate. It should only be readable by your deluge user account. I suspect it's complaining about not being able to read that private key. It's not the fopen(3) that's not allowed, it's what fopen(3) is trying to read (or write) that's not allowed.
 
  • Thanks
Reactions: dun
Code:
[ERROR   ] 10:25:54 rpcserver:378 [('system library', 'fopen', 'Permission denied'), ('BIO routines', 'FILE_CTRL', 'system lib'), ('SSL routines', 'SSL_CTX_use_certificate_file', 'system lib')]

I can't believe this is an actual error message, this certainly doesn't look like a normal stacktrace.
 
Aw man... I just forgot to chown /usr/local/etc/deluge?‍♂️It's running now with the deluge user :)

I can't believe this is an actual error message, this certainly doesn't look like a normal stacktrace.

It's the content of /var/tmp/deluged.log if you are as bright as me and forget to own the config folder.


An other question aside. /var/tmp is owned by root and I can't start deluged if I don't change the owner to deluge. What would be the best approach to give deluge write permissions without changing the owner?
 
/var/tmp is owned by root and I can't start deluged if I don't change the owner to deluge. What would be the best approach to give deluge write permissions without changing the owner?
Your /var/tmp should have 1777 permissions, meaning everyone can write there. The sticky(7) bit is there to allow for some sane controls (so one user can't delete another user's temp files)
 
Back
Top