Is there a way to change the file permissions of the downloaded files from Deluge?
I have Deluge download to a directory that is accessible over my network, and I wish to delete a file from that folder from another computer over the network. Currently, Deluge tells me that I do no have permission to do so. Is there anyway that I can correct this?
File permissions
Re: File permissions
Any ideas? I'm having to chmod 777 the entire download directory to allow my other machines to modify the files.
Re: File permissions
You could try using the execute plugin?
Re: File permissions
You could set an appropriate umask for the user running deluge.
Re: File permissions
Actually, I recently discovered that start-stop-daemon has a nice --umask option 

Re: File permissions
Would either of you care to elaborate on the umask option? I cant seem to figure it out
Re: File permissions
When a file/folder is created, its permissions are worked out by
where '&' is 'bitwise and', '~' is 'bitwise not' and both <permissions> and <umask> are octal values.
By default, your umask is 022
so when you create a file
you get 644 (rw-r--r--) as permissions for that file.
and when you create a directory
you get 755 (rwxr-xr-x) as permissions for that folder.
You can read more about it at http://en.wikipedia.org/wiki/Umask.
Changing your umask to 0 will effectively be the same as chmodding every folder as 777 and every file as 666.
Code: Select all
<permissions> & ~<umask>
By default, your umask is 022
so when you create a file
Code: Select all
0666 & ~022 = 0644
and when you create a directory
Code: Select all
0777 & ~022 = 0755
You can read more about it at http://en.wikipedia.org/wiki/Umask.
Changing your umask to 0 will effectively be the same as chmodding every folder as 777 and every file as 666.
Re: File permissions
Thanks, can't believe that option has been there all this time!! Goes to show my old boss' comments about checking the man pages are truejohnnyg wrote:Actually, I recently discovered that start-stop-daemon has a nice --umask option

I simply created a 'UMASK=000' variable to the top on my init script and then added '--umask $UMASK' for the two deluged start commands.
Could you update the sites ubuntu init script with this?
Re: File permissions
Are you adding the --umask somewhere in here?
Code: Select all
start-stop-daemon --start --background --quiet --pidfile $PIDFILE1 --exec $DAEMON1 \
Re: File permissions
Done.Cas wrote:Could you update the sites ubuntu init script with this?
You can add it in there, sure.chris86wm wrote:Are you adding the --umask somewhere in here?
Code: Select all
start-stop-daemon --start --background --quiet --pidfile $PIDFILE1 --exec $DAEMON1 \
Otherwise just grab the initscript again: http://dev.deluge-torrent.org/wiki/User ... InitScript