megafantastic
Posts: 1
Joined: Sat Dec 01, 2018 1:46 am

Permission denied with Transmission

Sat Dec 01, 2018 1:49 am

I have raspeberry pi with transmission set up. I recently got a Zyxel NAS326. I want use Pi as torrent client as it has a VPN enabled and NAS326 can't use VPN.

I've successfully mounted NAS share on Pi with this in fstab: //192.168.0.20/plex /home/piuser/MyNAS cifs username=user,password=pass123 0 0 And can access it without problems.

I have two directories made for Transmission: /home/piuser/MyNAS/torrent_complete

/home/piuser/MyNAS/torrent-inprogress

When I'm trying to start a torrent I get the message: Permission denied (/home/piuser/MyNAS/torrent_complete/movie/Data.bin)

How can I fix this?

I originally followed this guide and since I now have a NAS, I unplugged the HDD. https://pimylifeup.com/raspberry-pi-torrentbox/

User avatar
thagrol
Posts: 1336
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Permission denied with Transmission

Sat Dec 01, 2018 4:18 pm

  1. what are the ownership and permissions on your two directories? You can get these by running

    Code: Select all

    ls -ld /home/piuser/MyNAS/torrent_complete
    
    and

    Code: Select all

    ls -ld /home/piuser/MyNAS/torrent-inprogress
    
  2. Can you write to these directories while logged in as "piuser"?
  3. Is your NAS sharing them as read/write or read only?
  4. Have they been mounted as read/write or read only? Hint: check the output from

    Code: Select all

    mount|grep MyNas
  5. What user is your torrent client running as?
  6. Does your NAS support NFS?Don't worry if you don't know or it doesn't. NFS is much more linux friendly than cifs/samba and could be used instead.
Note to self: don't feed the trolls

If I've asked you a question, please answer it. I'm unlikely to be able to help without that information.

liankane
Posts: 1
Joined: Tue Mar 19, 2019 5:52 pm

Re: Permission denied with Transmission

Tue Mar 19, 2019 6:47 pm

Hello all,

I'm going to continue this thread, because I'm suffering the same issue but it is impossible to be solved.

I have connected in the same net a Raspberry and a MyCloud NAS from WD. My purpose is to use Transmission on the raspberry to download files on some foldes in the NAS.

I have guided transmission to this directory in different ways but finally I decided to mount the NAS address on Rpi and then use this mounted address on Transmission.

I have temporary mounted Nas as:
"sudo mount -t cifs -rw -o gues //IP Address/Public /mnt/NAS" where public is the folder that contains the subfoldes I want to access.

If I use /mnt/NAS as Transmission's directory, it answers with an error "Error: Unable to save resume file: Permission denied". After some investigation I think that the mounting is correct, but the permissions are not enough. I have check permission by GUI and the main folder has all the permission, but the subfolders are as:

-View content: Anyone
-Change Content: Only owner
-Access content: Anyone

I have tried to change the second permission to anyone with "sudo chmod 777 /mnt/NAS/subfolder name" but it does not take any change.

I have also check that @thagrol sais about checking folder permissions, but I cannot understand where is the problem. I copied you the log.

pi@raspberrypi:~ $ sudo mount -t auto -rw -o guest //192.168.0.13/Public/ /mnt/NAS
pi@raspberrypi:~ $ sudo chmod 777 /mnt/NAS/Descargas_Torrent
pi@raspberrypi:~ $ ls -ld /mnt/NAS
drwxr-xr-x 2 root root 0 Mar 19 18:55 /mnt/NAS
pi@raspberrypi:~ $ ls -ld /mnt/NAS/Descargas_Torrent
drwxr-xr-x 2 root root 0 Mar 18 09:39 /mnt/NAS/Descargas_Torrent
pi@raspberrypi:~ $ ls -ld /mnt/NAS/Descargas_Torrent_Incompletas/
drwxr-xr-x 2 root root 0 Jan 21 23:34 /mnt/NAS/Descargas_Torrent_Incompletas/
pi@raspberrypi:~ $ mount|grep /mnt/NAS
//192.168.0.13/Public/ on /mnt/NAS type cifs (rw,relatime,vers=default,sec=none, cache=strict,domain=,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.13,file_mo de=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576 ,echo_interval=60,actimeo=1)

Can someone help me with this issue? How can I change the permissions of the folder or if there is any other way to reach to my target?

Thanks too much in advance

User avatar
thagrol
Posts: 1336
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Permission denied with Transmission

Tue Mar 19, 2019 10:34 pm

liankane wrote:
Tue Mar 19, 2019 6:47 pm
Hello all,

I'm going to continue this thread, because I'm suffering the same issue but it is impossible to be solved.

I have connected in the same net a Raspberry and a MyCloud NAS from WD. My purpose is to use Transmission on the raspberry to download files on some foldes in the NAS.
I don't have, or have acess to one of those so can't help with anything specific to it.
I have guided transmission to this directory in different ways but finally I decided to mount the NAS address on Rpi and then use this mounted address on Transmission.

I have temporary mounted Nas as:
"sudo mount -t cifs -rw -o gues //IP Address/Public /mnt/NAS" where public is the folder that contains the subfoldes I want to access.
Whats "-o gues" ? I don't recall "gues" being a valid mount option for any filesystem. Nor do I recal "-rw" as being a valid argument to "mount".
If I use /mnt/NAS as Transmission's directory, it answers with an error "Error: Unable to save resume file: Permission denied". After some investigation I think that the mounting is correct, but the permissions are not enough. I have check permission by GUI and the main folder has all the permission, but the subfolders are as:

-View content: Anyone
-Change Content: Only owner
-Access content: Anyone
Given that you haven't supplied a username in your mount command, the NAS will be seeing a login as "root". This could be treated as a special case (coz it's root) or as a guest login.

With "Change Content: Only owner", if you're not logged in to the NAS as the owner of the file/folder it won't allow you to write to it.
I have tried to change the second permission to anyone with "sudo chmod 777 /mnt/NAS/subfolder name" but it does not take any change.
There could be all sorts of reasons for that. Too many to guess at without further information from you though if I had to put money on it I'd say the NAS is rejecting, or doesn't support the change.
I have also check that @thagrol sais about checking folder permissions, but I cannot understand where is the problem. I copied you the log.

pi@raspberrypi:~ $ sudo mount -t auto -rw -o guest //192.168.0.13/Public/ /mnt/NAS
pi@raspberrypi:~ $ sudo chmod 777 /mnt/NAS/Descargas_Torrent
pi@raspberrypi:~ $ ls -ld /mnt/NAS
drwxr-xr-x 2 root root 0 Mar 19 18:55 /mnt/NAS
pi@raspberrypi:~ $ ls -ld /mnt/NAS/Descargas_Torrent
drwxr-xr-x 2 root root 0 Mar 18 09:39 /mnt/NAS/Descargas_Torrent
pi@raspberrypi:~ $ ls -ld /mnt/NAS/Descargas_Torrent_Incompletas/
drwxr-xr-x 2 root root 0 Jan 21 23:34 /mnt/NAS/Descargas_Torrent_Incompletas/
pi@raspberrypi:~ $ mount|grep /mnt/NAS
//192.168.0.13/Public/ on /mnt/NAS type cifs (rw,relatime,vers=default,sec=none, cache=strict,domain=,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.13,file_mo de=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576 ,echo_interval=60,actimeo=1)

Can someone help me with this issue? How can I change the permissions of the folder or if there is any other way to reach to my target?

Thanks too much in advance
Part of the problem is that based on the info above, you've mounted the NAS in such a way that only "root" can write to it. I'm guessing that transmission is not running as root (and should not be).

You've two seperate but related issues to resolve: mount the NAS on the pi such that non-root users can write to it. And check permissions on the NAS allow writing to its disc by the user you logged in as.

I can't help with the NAS configuration.

For the mount command read up on mount.cifs, particularly the user=, password=, uid=, forceuid, gid=, forcegid, file_mode=, and dir_mode=
Hint: see

Code: Select all

man mount.cifs
Note to self: don't feed the trolls

If I've asked you a question, please answer it. I'm unlikely to be able to help without that information.

Return to “Other projects”