I followed the tutorial here (deluge-daemon using upstart under ubuntu) but I could see no way of managing file permissions or user masks. After a bunch of searching i came accross many posts indicating this needs to be handled by umask but could find no details on how to implement it. I read through the older tutorial here (deluge-daemon using initscript under ubuntu) even though at the very top it reccomends using the first tutorial since 2006. I noticed that this older method does have code to handle umask and adapted it to the first tutorial with the help of some quick manpage reference. Here is my resulting /etc/init/deluge.conf
Code: Select all
start on (filesystem and networking) or runlevel [2345]
stop on runlevel [016]
env uid=deluge
env gid=deluge
env umask=000
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d