Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-08-2011, 06:24 PM   #1
LQ Newbie
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
Transmission daemon permissions problem. SUID related???

Hi all,

I've installed transmission-daemon on a fairly fresh Debain Squeeze install, but am having some file permission problems.

The transmission user in Debian is "debian-transmission". I have verified that the daemon is started as this user:
$ ps --user debian-transmission
  PID TTY          TIME CMD
 3473 ?        00:00:00 transmission-da
I have created debian-transmission's home directory, with a torrents and .incomplete directory inside it:
$ ls -la /home/debian-transmission/

drwxrwxr-x 4 debian-transmission debian-transmission 4096 Oct  8 21:19 .
drwxr-xr-x 6 root                root                4096 Oct  8 20:39 ..
drwxr-xr-x 2 debian-transmission debian-transmission 4096 Oct  8 21:19 .incomplete
drwxr-xr-x 2 debian-transmission debian-transmission 4096 Oct  8 21:08 torrents
I copied the settings.json file over from a previous Ubuntu install, where it worked as expected. In the old install my download directory was inside my main user's home directory, with the permissions changed to allow debian-transmission to write to it. As you can see, in this install I have changed the settings.json to download into the transmission user's home dir.
$ sudo cat /etc/transmission-daemon/settings.json
[sudo] password for charlie: 
    "alt-speed-down": 1, 
    "alt-speed-enabled": true, 
    "alt-speed-time-begin": 420, 
    "alt-speed-time-day": 127, 
    "alt-speed-time-enabled": true, 
    "alt-speed-time-end": 1380, 
    "alt-speed-up": 1, 
    "bind-address-ipv4": "", 
    "bind-address-ipv6": "::", 
    "blocklist-enabled": false, 
    "dht-enabled": true, 
    "download-dir": "/home/debian-transmission", 
    "download-limit": 300, 
    "download-limit-enabled": 1, 
    "encryption": 1, 
    "incomplete-dir": "/home/debian-transmission/.incomplete", 
    "incomplete-dir-enabled": true, 
    "lazy-bitfield-enabled": true, 
    "lpd-enabled": false, 
    "max-peers-global": 200, 
    "message-level": 2, 
    "open-file-limit": 32, 
    "peer-limit-global": 120, 
    "peer-limit-per-torrent": 30, 
    "peer-port": 51413, 
    "peer-port-random-high": 65535, 
    "peer-port-random-low": 49152, 
    "peer-port-random-on-start": false, 
    "peer-socket-tos": 0, 
    "pex-enabled": true, 
    "port-forwarding-enabled": false, 
    "preallocation": 1, 
    "proxy": "", 
    "proxy-auth-enabled": false, 
    "proxy-auth-password": "", 
    "proxy-auth-username": "", 
    "proxy-enabled": false, 
    "proxy-port": 80, 
    "proxy-type": 0, 
    "ratio-limit": 1.0000, 
    "ratio-limit-enabled": true, 
    "rename-partial-files": true, 
    "rpc-authentication-required": true, 
    "rpc-bind-address": "", 
    "rpc-enabled": true, 
    "rpc-password": "{b479a979442320560a5fd6c6047461452ad68501/1dEzN8u", 
    "rpc-port": 9091, 
    "rpc-username": "charlie", 
    "rpc-whitelist": ",192.168.0.*", 
    "rpc-whitelist-enabled": true, 
    "script-torrent-done-enabled": false, 
    "script-torrent-done-filename": "", 
    "speed-limit-down": 300, 
    "speed-limit-down-enabled": true, 
    "speed-limit-up": 10, 
    "speed-limit-up-enabled": true, 
    "start-added-torrents": true, 
    "trash-original-torrent-files": false, 
    "umask": 2, 
    "upload-limit": 50, 
    "upload-limit-enabled": 0, 
    "upload-slots-per-torrent": 14, 
    "watch-dir": "/home/debian-transmission/torrents", 
    "watch-dir-enabled": true
I can access the web interface on localhost and via the local network. I have copied an old .torrent file into the "torrents" directory and changed its permissions to debian-transmission:debian-transmission (although I never had to do this on the old install, and can't think why I'd have to; I'm just trying to eliminate some causes).

When I try to run the download, the web interface reports"Error: Permission denied", even though it can connect to peers, and reports a download rate (for a while at least).

I've no idea why this permission problem is occurring. The filesystem permissions are as they were with my previous install, but the permission denied error indicates that the FS is where the issue lies.

Now, this is where my Linux-fu runs out. The default transmission data directories have slightly different permissions. (Note the sneaky 's' in the owner permissions):
$ ls -la /var/lib/transmission-daemon/
total 36
drwxr-xr-x  7 root                root                4096 Oct  8 21:58 .
drwxr-xr-x 63 root                root                4096 Oct  8 20:28 ..
drwxr-xr-x  2 root                root                4096 Oct  8 21:56 blocklists
drwsrwxr-x  2 debian-transmission debian-transmission 4096 Oct 17  2010 downloads
drwsr-x---  5 debian-transmission debian-transmission 4096 Oct  8 22:54 info
drwxr-xr-x  2 root                root                4096 Oct  8 21:58 resume
-rw-------  1 root                root                1871 Oct  8 21:58 settings.json
-rw-------  1 root                root                 137 Oct  8 21:58 stats.json
drwxr-xr-x  2 root                root                4096 Oct  8 21:57 torrents
This is something to to with SUIDs or GUIDs or something. I've done a bit of reading, and don't really get the significance of these. Can someone enlighten me? Do I have to set the SUID of debian-transmission's home directory to the same as the "downloads" directory above? Why? What are the security implications of this? Why did this work before on my Ubuntu install?

Thanks in advance,

Old 10-09-2011, 09:37 AM   #2
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,390
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
The SUID bit and SGID bits on directories are intended as a way of having files inside the directory inherit user and or group ownership from the directory (at the time of creation). However, on Linux the SUID bit for directories is not functional, so it will make no difference if you set it.

My guess is that the problem is more likely to be something to do with directory locations. A few things to try would be:

1) disable the incomplete directory in settings.json (just as a test), likewise the watch directory
2) check the default locations of things like the settings files (eg blocklists, and so on) - I notice on my Debian system that they are actually located inside the info subdirectory
3) remove your Ubuntu settings file and get it working first with the standard Debian settings, then start moving things into the /home/debian-transmision directory and see which ones are causing the failure
Old 10-19-2011, 04:03 PM   #3
LQ Newbie
Registered: Aug 2010
Posts: 4

Original Poster
Rep: Reputation: 0
OK sorry I've forgotten about this. I kind of knew I'd posted something, but couldn't even remember the subject!

In the end, I reinstalled transmission daemon to get the standard .json file back. Did progressive testing from standard through to the settings I wanted (baby steps etc), expecting to find the point of failure. I didn't.

It's now doing what it should have done in the first place, but I don't know why (or rather why it didn't work before).

I might post again if I figure out why it didn't work originally, but for now the issue is solved.

Thanks for your help.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Shorewall rejecting allowed traffic for transmission-daemon RyanRahl Linux - Security 7 05-23-2011 03:05 PM
mounting cifs as user - permissions problem with SUID bit dh4 Linux - Networking 1 01-11-2010 03:31 PM
A Question related to SUID (Set UID) saagar Linux - Newbie 3 02-03-2009 06:21 PM
Related to reserving headroom in sk_buff to support zero copy transmission Pankaj Srivastava Linux - Networking 0 05-23-2007 04:51 PM
Shortcut-key problem on KDE (file permissions related) MisterAvan Linux - Newbie 0 07-06-2003 10:27 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration