Transmission permission denied как исправить

I installed Xubuntu and transmission daemon, set the download path to my home/user/TV shows, and get a permission denied when trying to download torrents through the transmission.

I tried chmod -r 777 on this folder without success.

Please help!

Following is the output of ps -ef | grep transmission

chen@htpc:~$ ps -ef | grep transmission
109       1023     1  1 21:46 ?        00:00:35 /usr/bin/transmission-daemon --config-dir /var/lib/transmission-daemon/info

chen@htpc:~$ ps aux | grep transmission
109       1023  3.2  0.4  47684 16620 ?        Ssl  21:46   1:20     /usr/bin/transmission-daemon --config-dir /var/lib/transmission-daemon/info
chen      1852  0.0  0.0   4200   772 pts/0    S+   22:27   0:00 grep --color=auto transmission

enter code here

Bilesh Ganguly's user avatar

asked Nov 23, 2012 at 19:55

Chen Kinnrot's user avatar

6

Assuming the path to the download folder is /home/chen/TV shows, run the following:

  • add chen to the debian-transmission group

    sudo usermod -a -G debian-transmission chen
    
  • change the folder ownership

    sudo chgrp debian-transmission /home/chen/TV shows
    
  • grant write access to the group

    sudo chmod 770 /home/chen/TV shows
    
  • Stop the deamon with

    sudo service transmission-daemon stop
    
  • The last thing to do is change the file creation mask, so that the downloaded files would be writeable by chen.

    sudo nano /etc/transmission-daemon/settings.json
    

    … and change "umask": 18 to "umask": 2. Hit Ctrl+O to save and Ctrl+X to exit.

Start the daemon with

sudo service transmission-daemon start

David Foerster's user avatar

answered Nov 23, 2012 at 20:58

mikewhatever's user avatar

mikewhatevermikewhatever

32.1k10 gold badges86 silver badges98 bronze badges

8

Check if you’re using an “incomplete” folder.
The error can be misleading in this case and it may be the incomplete folder you do not have write access to.

answered Sep 23, 2015 at 17:41

blockdor's user avatar

blockdorblockdor

911 silver badge1 bronze badge

4

This is a permission issue based on the user ID that is running Transmission. Transmission sets up a default user that you might not expect on first install. The user name is debian-transmission.

I will explain how to change that:

  1. Stop the Transmission daemon sudo service transmission-daemon stop
  2. Open the Transmission config file for editing: sudo nano /etc/init.d/transmission-daemon
  3. Find the line that says USER=debian-transmission and change it to the user that owns the folder in question. If you are not concerned about security issues, you can also use USER=root in this file. (Not advised, but good for troubleshooting).
  4. Alternatively (instead of point number 3), modify the /etc/fstab folder to mount the folder with correct permissions for the user that runs the transmission-daemon.
  5. Start the Transmission daemon sudo service transmission-daemon start

Community's user avatar

answered Nov 16, 2013 at 7:09

Terry's user avatar

TerryTerry

2743 silver badges9 bronze badges

2

Since this is the top search result in Google, for anyone reading this, I spend over an hour trying to get it to work. Turns out, the downloads folder specified in settings.json is “Downloads” instead of “downloads”. Note the case.

answered Nov 23, 2016 at 13:21

SomeGuest1425125125's user avatar

This might be an apparmor profile problem. Transmission runs under the sanitized_helper profile in apparmor.

Look for complaints in /var/log/kern.log. grep transm /var/log/kern.log, particularly just after trying to run transmission and it failing.

answered Nov 23, 2012 at 23:58

Jim Salter's user avatar

Jim SalterJim Salter

4,3231 gold badge15 silver badges33 bronze badges

This just happened to me. I found this page, was intimidated by all the jargon, so I restarted Transmission, reserved the torrent file to a different location, and saved the torrent data to the same different location (desktop). Worked like a charm…

graham's user avatar

graham

9,40517 gold badges36 silver badges59 bronze badges

answered Jul 31, 2015 at 15:02

Alexia's user avatar

my problem was that transmission somehow was running as the user “transmissions-daemon” instead of the user it was supposed to run with.

answered Aug 11, 2020 at 14:24

user1115637's user avatar

1

In my case the problem was how the drive was being mounted. Using this in /etc/fstab worked for me:

UUID=2069-1A05  /mnt/ext   vfat   rw,user,exec,umask=0000   0   0

Zanna's user avatar

Zanna

68.8k55 gold badges214 silver badges326 bronze badges

answered Jan 2, 2017 at 19:24

davidcm's user avatar

1

Make sure that the path for your incomplete torrents is absolute. My main directory was using ~/path-to-download, which gave me an error. My incomplete directory was ~/path-to-download/incomplete.

I received an error the first time I tried to download a torrent not using an absolute directory. I fixed that, but kept receiving a permission denied error, even after adding the correct permissions. Once I fixed my incomplete path to an absolute path, everything worked.

BeastOfCaerbannog's user avatar

answered Dec 22, 2019 at 19:49

TorturdChaos's user avatar

Mounting the external drive into my home directory resolved this issue;

sudo mkdir /home/plex/media-server
sudo chmod 770 /home/plex/media-server
sudo mount /dev/sdxx/ /home/plex/media-drive

sdxx is the name of your hdd. you can use the following command to find yours:

lsblk

Zanna's user avatar

Zanna

68.8k55 gold badges214 silver badges326 bronze badges

answered Feb 22, 2019 at 11:37

liquidbender's user avatar

Try this:

sudo setfacl -m u:debian-transmission:rxw  /home/*your user*/*your path to folder*

answered Sep 14, 2020 at 10:23

Mika Bibika's user avatar

1

None of these suggestions worked for me so I just set fstab to use transmission-daemon’s default download directory as the mountpoint to mount my USB stick.

  1. First I set the ownership of my USB stick to match that of the default download directory:

sudo chown debian-transmission:debian-transmission /media/pi/[mountpoint]/

  1. Edit fstab:

sudo nano /etc/fstab

Insert the following text:

UUID=[insert device UUID here] /var/lib/transmission-daemon/downloads ext4 rw,user,exec 0 0

Note: you can find your USB sticks UUID by running sudo blkid

  1. Reboot the system:

sudo reboot

  1. You can test whether it is writing data to your USB stick by running df -ha and checking whether the data written to your USB stick increases when you add a new torrent. Note that the data increase happens all at once when you add a new torrent and NOT gradually as the torrent downloads.

answered Apr 11, 2022 at 13:32

sifr's user avatar

0

I added the debian-transmission user to my $USER group:

sudo usermod -a -G <myusername> debian-transmission

answered Jun 26, 2022 at 19:27

Mark Smith's user avatar

Mark SmithMark Smith

5644 silver badges9 bronze badges

In my case I have the “download-dir”, “incomplete-dir” (and “watch-dir”) situated in my home-directory.

(presume my userid is ‘[user]‘)

ls -la /home/[user]/Transmission results in:

drwxr-xr-x  5 [user] debian-transmission 4096 sep 17 21:21 ./
drwxr-x--- 19 [user] [user]              4096 sep 20 20:08 ../
drwxrwxr-x  3 [user] debian-transmission 4096 sep 18 23:04 Completed/
drwxrwxr-x  4 [user] debian-transmission 4096 sep 20 20:11 Incomplete/
drwxrwxr-x  2 [user] debian-transmission 4096 sep 17 21:21 Torrents/

As you can see the user debian-transmission has all the necessary permissions to write in those directories except… it has no read and execute permission on /home/[user] !!! So as a result, debian-transmission cannot access its subdirectories either.

  • Lesson learned: check the permissions for the entire path ! Not just the final target directory !

There are now 3 options (choose one !):

  1. Add the group [user] to the user debian-transmission (sudo usermod -a -G [user] debian-transmission)
  2. Set x-permissions on world for /home/[user] (sudo chmod o+x /home/[user])
  3. Stop the deamon, move the whole directory tree /home/[user]/Transmission to the home directory of debian-transmission. Set ownership of those directories to debian-transmission:debian-transmission. Edit /etc/transmission-daemon/settings.json likewise. Add group debian-transmission to [user] and -finally- start the deamon again.

Option 1 and 2 have some minor security issues so option 3 is probably the best.

answered Sep 20, 2022 at 18:49

T-men's user avatar

T-menT-men

11 bronze badge

2022 and I had the same issue.

A simple sudo chown debian-transmission:debian-transmission -R /path/to/download solved it for me.

answered Dec 7, 2022 at 23:15

Bred Faiano's user avatar

For those with custom locations, be sure you are applying chown to the original folder path and not a symlink.

sudo chown -R debian-transmission:debian-transmission /mnt/nas/downloads

NOT

sudo chown -R debian-transmission:debian-transmission /home/coolguy/nas/downloads

Add a 755

sudo chmod -R 755 /mnt/nas/downloads

I was able to get around the permissions issue by doing that. Also, no need to change the umask or 777 (or running as root, not a good plan).

Also, the latest transmission-daemon doesn’t seem to include and error log. Add this to your config file if you need some error output for debugging:

"log-error-file": "/var/log/transmission-error.log"

Be sure to restart

systemctl restart transmission-daemon

answered Jan 6 at 2:19

FrankZappa's user avatar

I had same issue, and that was a mistake I had made when sym-linking the transmission download directory to my home/user/ directory, I changed the ownership of the sym-linked file which by consequence also changed the ownership of the transmission ‘download’ directory…

I just chowned back to ‘debian-transmission’ ownership and it worked like a charm (without need to restart service)

#chown debian-transmission:debian-transmission /var/lib/transmission/downloads

(well, you’ll have to check according your own linux distribution what is the right owner and eventually also your right path to the downloads directory)

answered Dec 9, 2014 at 10:37

baobab33's user avatar

I had similar issue with transmission. I got Permission Error while downloading even with correct folder permission settings on the external USB HDD.

I just mounted the external HDD to the /home/pi/ with the same permissions and it worked fine.

mount /dev/sda /home/pi/USB-HDD-MOUNTED

permissions are drwxrwxrwx (0777) pi:debian-transmission.
user name is changed to pi in /etc/init.d/transmisssion-daemon.

David Foerster's user avatar

answered Feb 12, 2016 at 10:00

Akos's user avatar

Столкунлся с такой же проблемой почитал… права все стоят – но не работает

заработало только после того как изменил в конфигурационном файле /usr/local/transmission/var/settings.json

праметр Incomplete-dir-enabled на false.

сохранился и перезагрузил сервис.

всё заработало. Но теперь, понятное дело, недокаченные части появляются в папке завершённых закачек в виде партов. Меня это не смущает.

почему не работало до этого не понятно, ведь при установке из пакета я указывал путь к папке incomplete( который правильно отражается и конфигурационном файле)

соотвествующие права были даны для этой папки. Впрочем если этот путь не указывать вовсе то происходит тоже самое.

Подозреваю что это какойто глюк и transmission просто игнорит установленный вручную параметр “incomplete-dir” используя для него путь по умолчанию “/usr/local/transmission/var/(имя папки для завершённых закачек)” , вместо указанноного непосредственно(скажем “/volume1/transmission/incomplete”).

моя версия трансмисион 2.84

моё устройство DS213j с DSM5.2

При начале закачки нового торрента сразу же выдает такую ошибку:
Transmission daemon Error: permission denied
Полагаю проблема с правами доступа, как исправить
Система Ubuntu Linux 18.04.2

Конфиги:
settings.json

{
“alt-speed-down”: 50,
“alt-speed-enabled”: false,
“alt-speed-time-begin”: 540,
“alt-speed-time-day”: 127,
“alt-speed-time-enabled”: false,
“alt-speed-time-end”: 1020,
“alt-speed-up”: 50,
“bind-address-ipv4”: “0.0.0.0”,
“bind-address-ipv6”: “::”,
“blocklist-enabled”: false,
“blocklist-url”: “www.example.com/blocklist”,
“cache-size-mb”: 4,
“dht-enabled”: true,
“download-dir”: “/media/FILMS”,
“download-limit”: 100,
“download-limit-enabled”: 0,
“download-queue-enabled”: true,
“download-queue-size”: 5,
“encryption”: 1,
“idle-seeding-limit”: 30,
“idle-seeding-limit-enabled”: false,
“incomplete-dir”: “/media/.incomplete”,
“incomplete-dir-enabled”: true,
“lpd-enabled”: false,
“max-peers-global”: 200,
“message-level”: 1,
“peer-congestion-algorithm”: “”,
“peer-id-ttl-hours”: 6,
“peer-limit-global”: 200,
“peer-limit-per-torrent”: 50,
“peer-port”: 51413,
“peer-port-random-high”: 65535,
“peer-port-random-low”: 49152,
“peer-port-random-on-start”: false,
“peer-socket-tos”: “default”,
“pex-enabled”: true,
“port-forwarding-enabled”: false,
“preallocation”: 1,
“prefetch-enabled”: true,
“queue-stalled-enabled”: true,
“queue-stalled-minutes”: 30,
“ratio-limit”: 2,
“ratio-limit-enabled”: false,
“rename-partial-files”: true,
“rpc-authentication-required”: false,
“rpc-bind-address”: “0.0.0.0”,
“rpc-enabled”: true,
“rpc-host-whitelist”: “”,
“rpc-host-whitelist-enabled”: true,
“rpc-password”: “{8f756f1341a8a27ad60d25ed4f95ced0e1ea7fe3tUAtbBjY”,
“rpc-port”: 9091,

smb.conf
[global]
security = user
directory mode = 777
map to guest = Bad User
workgroup = WORKGROUP
server string = Samba
create mode = 777
force directory mode = 777
writeable = yes
force create mode = 777
os level = 20

[TORRENTS]
path = /media/TORRENTS
browseable = Yes
guest ok = Yes
writeable = Yes
public = yes

[.incomplete]
path = /media/.incomplete
browseable = Yes
guest ok = Yes
writeable = Yes
public = yes

Оффлайн
Alex_x86

Добрый день.
Не могу побороть проблему Transmission permission denied.
Есть Ubuntu Server 16.04.6. Внешний жесткий диск смонтирован в папку пользователя ~/Storage. На диске файловая система NTFS. Монтирую автоматом через fstab.
Папка монтируется с правами:

drwxrwxr-x 1 root plugdev 8192 авг  3 18:50 Storage1.   Добавил Transmission в группу plugdev, не помогло. А права на папку не меняются.
2.   Решил в домашнюю папку пользователя качать. Проблема осталась. Пробовал прописать в настройках Transmission чтобы запускался от имени пользователя в файлах:
/etc/init.d/transmission-daemon

NAME=имя_пользователя
USER= имя_пользователя
/etc/systemd/system/multi-user.target.wants/transmission-daemon.service

User= имя_пользователя

sudo systemctl daemon-reloadПеред этим перенес каталог с настройками

sudo cp -R /etc/transmission-daemon /home/ имя_пользователя /.config/
sudo chown -R имя_пользователя /home/ имя_пользователя /.config/transmission-daemon
С такими настройками нет доступа к Web интерфейсу. Проверить закачку не смог.
Игрался с правами, настройками в /etc/transmission-daemon/settings.json…не помогло.
Все работает если оставить настройки по умолчанию и качать в /var/lib/transmission-daemon/downloads.
Мне нужно качать на внешний жесткий диск. В крайнем случае в домашнюю папку пользователя.

Подскажите как это сделать:
Что можно сделать чтобы на внешний HDD перемонтированный в другую папку домашнего каталога пользователя, можно было качать напрямую? Может его форматировать в ext? Тогда какой ext  2,3 или 4?
Как настроить права чтобы закачать в /home/ имя_пользователя/Папка_на диске Ubuntu/

Спасибо.

« Последнее редактирование: 04 Августа 2019, 18:27:22 от Azure »

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 debian 7.

The download folder is

Code: Select all

 /media/Calliope2/DOWNLOAD/completed

rights to this folder are:

Code: Select all

 drwxrwxrwx 2 debian-transmission debian-transmission 

same rights for incomplete and even parent DOWNLOAD dir… all is 777, so everybody should be able to write, and it is all owned by debian-transmission user.

transmission settings in /etc/transmission-daemon/settings.json:

Code: Select all

{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/media/Calliope2/DOWNLOAD/completed",
    "download-limit": 100,
    "download-limit-enabled": 0,
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/media/Calliope2/DOWNLOAD/incomplete",
    "incomplete-dir-enabled": true,
    "lpd-enabled": false,
    "max-peers-global": 200,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-limit-global": 240,
    "peer-limit-per-torrent": 60,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 3,
    "ratio-limit-enabled": true,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{8b0144c79015b69e7dd32d73a5cb901144afa932pYa4o81E",
    "rpc-port": 9808,
    "rpc-url": "/transmission/",
    "rpc-username": "zebra",
    "rpc-whitelist": "*.*.*.*",
    "rpc-whitelist-enabled": true,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "/media/Calliope2/DOWNLOAD/torrComp.sh",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 2,
    "upload-limit": 100,
    "upload-limit-enabled": 0,
    "upload-slots-per-torrent": 14,
     "utp-enabled": true,
    "watch-dir": "/media/Calliope2/DOWNLOAD/torrentz",
    "watch-dir-enabled": true
}

Setting was edited while the deamon was stopped. Then I restarted the daemon with

Code: Select all

sudo service transmission-daemon start

shows that the daemon is running:

Code: Select all

114       4555     1  0 16:34 ?        00:00:00 /usr/bin/transmission-daemon --config-dir /var/lib/transmission-daemon/info

user 114 is debian-transmission becauase in /etc/passwd there is:
debian-transmission:x:114:123::/home/debian-transmission:/bin/false

THE PROBLEM: When I connect via web gui, I add new torrent, it loads the torrent file, starts conencting to peers, then it starts first few MBs (abou 4 MB) and then it stops saying:

Error: Permission denied (/media/Calliope2/DOWNLOAD/completed/Sherlock.2×03.The.Reichenbach.Fall.720p.HDTV.x264-FoV.mkv)

Also it ignores the watch-dir directory, never loading torrents from it.

Thanks for any help

Добавить комментарий