Jarosław Szmigielski's techblog

My personal adventure with IT

Force Transmission daemon to make directories accessible for Samba users

October 26th, 2012
Recently I faced a problem that directories created by transmission daemon had insufficient permissions to write in them by Samba users. I needed this feature because I wrote a bot (soon I will post it) that monitors RSS feed of private torrent tracker and downloads .torrent files with my favorite TV series. Then transmission starts downloading it. When it finishes I go there though Samba on my laptop with Windows and I need to download subtitles there. Here comes the problem with lack of permissions for user that I connect though samba.

My transmission daemon runs on user debian-transmission and on group with the same name. I connect though Samba using pi user. So I’ve added user pi to debian-transmission group:

# usermod -a -G debian-transmission pi

I needed to change also transmission settings (usually located in /etc/transmission-daemon/settings.json) and change line with:

"umask": 18,

to line:

"umask": 2,

Umask is usually represented in octal, but json does not support that, so we need to convert it to decimal. We can use simple bash command as quick calculator:

# echo $(( 8#022 ))
18

After modification of settings.json file save it and make command:

# service transmission-daemon reload

 

Now you can make files in directories created in transmission daemon though Samba :)

Jarosław Szmigielski

jaroslaw@szmigielski.info

Your email address will not be published. Required fields are marked *

*


+ six = 14