Permission issues for download location

General support for problems installing or using Deluge
jaygroh
New User
New User
Posts: 3
Joined: Thu Dec 21, 2017 1:44 am
OS or Distro: Ubuntu

Permission issues for download location

Postby jaygroh » Thu Dec 21, 2017 2:45 am

Running Ubuntu 16.04 in a small VM

I have a cifs share going to my media server for storage. I want to have deluge download torrents to /media/Media/Bittmp and when finished move them to /media/Media/Bittorrent

It will start to download but then error out with permission denied. It creates a directory with as the cifs share user name which is the same name I use and has owner read write, user read, and others read.

I can force a 777 on all the directory and files it creates for the torrent and it will download fine but still has issues moving it because of the same permission error. What am I missing to get it to write to the download location correctly?

In the systemd script I have the umask set to 000

shamael
Super Seeder
Super Seeder
Posts: 351
Joined: Sat Oct 08, 2016 9:28 am
OS or Distro: osmc

Re: Permission issues for download location

Postby shamael » Fri Dec 22, 2017 10:33 am

Hi,

Cifs mounted with fstab? What's the line?
Are your sure Deluge user has access to this location? check with a "ps aux|grep-i delug*"

Be aware the move is not mandatory, certainly on the same storage. You can download directly in the final folder but you may have good reason to make the move of course.

jaygroh
New User
New User
Posts: 3
Joined: Thu Dec 21, 2017 1:44 am
OS or Distro: Ubuntu

Re: Permission issues for download location

Postby jaygroh » Fri Dec 22, 2017 4:01 pm

Here is what I have used for the cifs line in fstab
//media/Data /media/Media cifs username=jay,password=(my password) 0 0

I'm pretty sure it has rights. It will create a directory but then cannot write into the directory. I will do a 777 on it and it will create the file inside the directory but it cannot write to the file so I do another 777 on the file. Then it will download it. When it creates the directory the owner is always jay and not deluge.

Here is the output of ps aux | grep -i delug*
deluge 1292 0.1 10.7 148608 51944 ? Ss Dec21 1:43 deluge-web
deluge 34065 6.4 14.6 355332 70436 ? Sl 10:44 0:29 /usr/bin/python /usr/bin/deluged --port=58846 --config=/var/lib/deluge/.config/deluge
jay 34335 0.0 0.2 14224 972 pts/1 S+ 10:51 0:00 grep --color=auto -i delug*

The move is not necessary but I use the final move to Bittorrent as a directory of new TV shows and movies to watch that are done downloading. When I'm done watching them I move them manually to a TV or Movie directory for final storage.

shamael
Super Seeder
Super Seeder
Posts: 351
Joined: Sat Oct 08, 2016 9:28 am
OS or Distro: osmc

Re: Permission issues for download location

Postby shamael » Sat Dec 23, 2017 1:29 pm

The behaviour is expected with the line you specified, may you tray with the line below? (umount, fstab change, mount -a)
//media/Data /media/Media cifs username=jay,password=(my password),iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

This way jay will still be the owner but permission 777 are automatically added. I prefer to create different users on the cifs share but that's another topic ;).

jaygroh
New User
New User
Posts: 3
Joined: Thu Dec 21, 2017 1:44 am
OS or Distro: Ubuntu

Re: Permission issues for download location

Postby jaygroh » Sun Dec 24, 2017 12:47 am

Still no change. Deluge still creates a directory with user jay with owner as RW, group R, and others R.

If I point it to a local directory with full access it will create a directory with user deluge with owner RW, group R, others R and it works fine.

If I touch a file in /media/Media/Bittmp the owner is jay with RW, group R, others, R.

If I touch a file in a local directory it is owner RW, group RW, others R.

Something is not right with folder and file creation. I've tried multiple umask setting in the deluge systemd script but its either no change or it wont even work.

shamael
Super Seeder
Super Seeder
Posts: 351
Joined: Sat Oct 08, 2016 9:28 am
OS or Distro: osmc

Re: Permission issues for download location

Postby shamael » Mon Dec 25, 2017 11:20 pm

I've no test system for the moment but the line should work. It's weird the folder created doesn't respect the fstab entry
May you set the permission on //media/Data /media/Media first? (just to be sure)
sudo chown -R jay:jay //media/Data /media/Media
sudo chmod -R jay:jay //media/Data /media/Media

Then umount/mount again the share (or reboot).


Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests