Permission denied on Raspberry Pi and external HDD

General support for problems installing or using Deluge
Post Reply
dikey94
New User
New User
Posts: 4
Joined: Sat Jan 12, 2019 4:24 pm

Permission denied on Raspberry Pi and external HDD

Post by dikey94 »

Hello everyone :)

I'm trying to setup Deluge on my Raspberry Pi. I'm using external HDD. I've configured 2 services:
- deluged
- deluge-web
as described here: https://dev.deluge-torrent.org/wiki/Use ... ce/systemd

I have 2 partitions on the hdd - NTFS one EXT4 one. I'd like to use the EXT4 partition.

I've created a directory with 777 chmod. The deluged service has Umask set as 000.

Unfortunately, I get permission denied and deluge can't write anything on that disk.

I'd appreciate any help.
Cheers.
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Permission denied on Raspberry Pi and external HDD

Post by shamael »

Hi,

Mount your drive, try to write with your logon user on the disk (a new folder on the root for example)
Do the same with the user of the service (sudo -u $your_user).What's the result?
dikey94
New User
New User
Posts: 4
Joined: Sat Jan 12, 2019 4:24 pm

Re: Permission denied on Raspberry Pi and external HDD

Post by dikey94 »

Hi,
thanks for the reply.

Here we go:

Code: Select all

pi@raspberrypi:/media/pi $ ls -la
razem 17
drwxr-x---+ 5 root   root   4096 sty 13 16:11 .
drwxr-xr-x  3 root   root   4096 lis 13 15:25 ..
drwxr-xr-x  3 deluge deluge 4096 sty 12 16:47 a21d9b61-7c86-4376-b432-c57933d637fe
drwxr-xr-x  3 deluge deluge 4096 sty 14 16:05 bfa2255e-2187-40d9-ad93-f6bcdda80d7a
drwxr-xr-x  4 root   root   1024 sty  4 18:03 SETTINGS
pi@raspberrypi:/media/pi $ cd bfa2255e-2187-40d9-ad93-f6bcdda80d7a
pi@raspberrypi:/media/pi/bfa2255e-2187-40d9-ad93-f6bcdda80d7a $ mkdir downloads
mkdir: nie można utworzyć katalogu „downloads”: Brak dostępu
pi@raspberrypi:/media/pi/bfa2255e-2187-40d9-ad93-f6bcdda80d7a $ sudo -u deluge mkdir downloads
pi@raspberrypi:/media/pi/bfa2255e-2187-40d9-ad93-f6bcdda80d7a $ ls -la
razem 28
drwxr-xr-x  4 deluge deluge  4096 sty 14 16:05 .
drwxr-x---+ 5 root   root    4096 sty 13 16:11 ..
drwxr-xr-x  2 deluge deluge  4096 sty 14 16:05 downloads
drwx------  2 root   root   16384 sty 13 16:04 lost+found
I can't create a directory as a loggon user.


Here is also deluges.service content:

Code: Select all

[Unit]
Description=Deluge Bittorrent Client Daemon
Documentation=man:deluged
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=000
ExecStart=/usr/bin/deluged -d
Restart=on-failure
# Time to wait before forcefully stopped.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Permission denied on Raspberry Pi and external HDD

Post by shamael »

You seems to have no right for the user "pi" on this drive except execute. The chmod 777 is possible but needs to be done recursively (-R)and with sudo.
It all depends about what you want to do but guessing you want to use the disk for Deluge and be able to read its content with the user pi, a simple way will be adding the user "pi" to the group "deluge"

You can run the service as pi user too but I like to keep such thing splited
dikey94
New User
New User
Posts: 4
Joined: Sat Jan 12, 2019 4:24 pm

Re: Permission denied on Raspberry Pi and external HDD

Post by dikey94 »

Code: Select all

pi@raspberrypi:~ $ cd /media/pi/
pi@raspberrypi:/media/pi $ sudo chmod 777 -R bfa2255e-2187-40d9-ad93-f6bcdda80d7a/
pi@raspberrypi:/media/pi $ sudo usermod -a -G deluge pi
pi@raspberrypi:/media/pi $ sudo service deluged stop
pi@raspberrypi:/media/pi $ sudo service deluged start

And... not working.
Status: Brak dostępu: /media/pi/bfa2255e-2187-40d9-ad93-f6bcdda80d7a/bigbeninteractiveOutcast-7693-DRMFREE.zip
which means Permissions denied: /media/pi/bfa2255e-2187-40d9-ad93-f6bcdda80d7a/bigbeninteractiveOutcast-7693-DRMFREE.zip
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: Permission denied on Raspberry Pi and external HDD

Post by shamael »

May you try to apply the chmod on the mount point /media/pi/ ?
dikey94
New User
New User
Posts: 4
Joined: Sat Jan 12, 2019 4:24 pm

Re: Permission denied on Raspberry Pi and external HDD

Post by dikey94 »

pi@raspberrypi:/media $ sudo chmod -R 777 pi/
pi@raspberrypi:/media $ sudo service deluged restart

Works.
Post Reply