transmission-daemon permission denied on ubuntu server

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
toto56
Posts: 7
Joined: Mon Aug 23, 2010 8:47 pm

transmission-daemon permission denied on ubuntu server

Postby toto56 » Mon Aug 23, 2010 8:59 pm

Hi everyone,

I have read a lot of posts on the permission denied problem but none solved my problem.

I have transmission-daemon running on ubuntu server 10.04. I acces it via the WebUI.
The download folder is a Samba shared folder that I mounted with debian-transmission user.

When I had a torrent, the file created by transmission-daemon is owned by root and therefore it says "Permission denied".
To enable the download I do a chown -R debian-transmission /media/myDLfolder and it starts.
But each time I add a new torrent I have to do this...

Is there a way to have the newly created files owned by debian-transmission or my user?

(I installed transmission-daemon with sudo apt-get install debian-transmission if it helps)

Thanks,

Iw9WlOuY
Posts: 31
Joined: Fri Jul 03, 2009 12:49 am

Re: transmission-daemon permission denied on ubuntu server

Postby Iw9WlOuY » Mon Aug 23, 2010 10:54 pm

downloaded files will have the ownership of the user who's running the daemon

toto56
Posts: 7
Joined: Mon Aug 23, 2010 8:47 pm

Re: transmission-daemon permission denied on ubuntu server

Postby toto56 » Tue Aug 24, 2010 5:44 am

But how do I change the user who's running the daemon? It starts by default at ubuntu boot.

toto56
Posts: 7
Joined: Mon Aug 23, 2010 8:47 pm

Re: transmission-daemon permission denied on ubuntu server

Postby toto56 » Tue Aug 24, 2010 6:36 am

In /etc/init.d/transmission-daemon, I have USER=debian-transmission.
So transmission-daemon should start with debian-transmission right?

toto56
Posts: 7
Joined: Mon Aug 23, 2010 8:47 pm

Re: transmission-daemon permission denied on ubuntu server

Postby toto56 » Tue Aug 24, 2010 6:38 am

If I do a top-u debian-transmission, I have transmission-daemon running with debian-transmission user.

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: transmission-daemon permission denied on ubuntu server

Postby rb07 » Tue Aug 24, 2010 11:46 pm

toto56 wrote:In /etc/init.d/transmission-daemon, I have USER=debian-transmission.
So transmission-daemon should start with debian-transmission right?

Maybe, it depends if the script uses that variable or not.

toto56 wrote:If I do a top-u debian-transmission, I have transmission-daemon running with debian-transmission user.

But, did you stop the daemon running as root? Did you check that all files, configuration and downloads, have read and write permissions for the debian-transmission user?

toto56
Posts: 7
Joined: Mon Aug 23, 2010 8:47 pm

Re: transmission-daemon permission denied on ubuntu server

Postby toto56 » Wed Aug 25, 2010 6:35 am

Thanks for your reply.

I am on ubuntu server, so I stop the daemon with sudo (sudo /etc/init.d/transmission-daemon stop). Start/stop transmission daemon is only allowed with sudo (root).
The folder is mounted with debian-transmission user, the files are owned by debian-transmission user and group (chown -R debian-transmission, chgrp -R debian-transmission). I have made a chmod -R 777 on the download folder...
But still when a new file is created, it is owned by root.

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: transmission-daemon permission denied on ubuntu server

Postby rb07 » Wed Aug 25, 2010 3:15 pm

toto56 wrote:But still when a new file is created, it is owned by root.

Then it is running as root.

Let's try something simple, run:

Code: Select all

ps -ef | grep trans

Is the second field (the user name) different than root?

If it is
  • root: did you check that the init script changes users? If it does, did you check that the program is not suid (set user id)?
  • not root: check if the download directory has not the sgid (set group id) permission.
There are probably more possible causes, like your Samba options... but this is a Transmission forum, and all of these has nothing to do with Transmission, its about using Linux.

toto56
Posts: 7
Joined: Mon Aug 23, 2010 8:47 pm

Re: transmission-daemon permission denied on ubuntu server

Postby toto56 » Wed Aug 25, 2010 8:27 pm

Thanks for your reply,

The command ps -ef | grep trans returns that transmission-daemon is running under user 104 which is debian-transmission

I am now testing with the download folder on a the local folder (no samba mount) and I still have the same problem...

toto56
Posts: 7
Joined: Mon Aug 23, 2010 8:47 pm

Re: transmission-daemon permission denied on ubuntu server

Postby toto56 » Wed Aug 25, 2010 8:44 pm

I added debian-transmission user to my user (admin) group and now it works.
But the owner of the file is still root.

costales
Posts: 1
Joined: Fri Oct 18, 2013 4:45 pm

Re: transmission-daemon permission denied on ubuntu server

Postby costales » Fri Oct 18, 2013 4:48 pm

Try this:

mkdir /your_path/progress
mkdir /your_path/completed
sudo usermod -a -G debian-transmission your_user
chgrp debian-transmission /your_path/progress
chgrp debian-transmission /your_path/completed
chmod 770 /your_path/progress
chmod 770 /your_path/completed
sudo service transmission-daemon stop
sudo adduser your_user debian-transmission
sudo nano /etc/init.d/transmission-daemon
sudo chown your_user -R /var/lib/transmission-daemon/info/
sudo chown your_user -R /your_path/progress
sudo chown your_user -R /your_path/completed
sudo chown your_user -R /etc/transmission-daemon/settings.json

And change in the file:
sudo nano /etc/transmission-daemon/settings.json

"rpc-whitelist": "127.0.0.1" > "rpc-whitelist": "*.*.*.*",
"rpc-password": "password" > "rpc-password": "your_password",
"download-dir": "/var/lib/transmission-daemon/downloads" > "download-dir": "/your_path/completed"
"incomplete-dir": "/var/lib/transmission-daemon/downloads" > "incomplete-dir": "/your_path/progress"


Just restart the daemon:

service transmission-daemon start

Cuore Sportivo
Posts: 5
Joined: Sat Mar 19, 2016 2:40 pm

Re: transmission-daemon permission denied on ubuntu server

Postby Cuore Sportivo » Thu Jun 30, 2016 11:58 am

Hello everyone and sorry for digging such an old thread, but I have the exact same problem.

I have a samba shares server (running on a Ubuntu VM) with guest access enabled, so that guests can read/write files.
On another Ubuntu VM, I have installed transmission daemon, and I have also mounted on /media/torrents the torrents folder of my ubuntu shares server (//samba.local.ip/torrents), so that transmission can immediately download torrents to the local folder.

Even though I can read/write files without any problem to the samba shares, when transmission starts to download any torrent, after a couple of seconds, it will get an error (permission denied).

I added transmission-daemon to user group (sudo usermod -a -G user debian-transmission), but nothing changes. I also tried to change the group owner of /media/torrents, but I get a permission denied.

Any help is deeply appreciated!

henster
Posts: 1
Joined: Tue Dec 06, 2016 6:16 pm

Re: transmission-daemon permission denied on ubuntu server

Postby henster » Tue Dec 06, 2016 6:19 pm

Hi '

please still struggling with this error , can some please tell me the secret to get this fixed ?


Return to “Support”