Issue setting up NZBget folders to a mounted NAS
|
Posts: 5
Threads: 1
Joined: Jun 2016
Reputation:
0
[Solved]
Jun 03, 2016, 04:59 PM
I have run the following guides to setup nzbget, sonarr, and couchpotato on my raspberry pi2.
http://www.htpcguides.com/raspberry-pi-2...ler-image/
http://www.htpcguides.com/mounting-stora...ian-linux/
So i set the MainDir setting in NZBget to: /nas/usenet/nzbget
where /nas is a local folder that i have mounted the network share to (follwoing the second guide).
but whenever nzbget starts downloading I get a few errors regarding permission to the folder:
nzbget.conf(61): Invalid value for option "NzbDir" (/nas/usenet/nzbget/nzb/): could not create directory /nas/usenet/nzbget/nzb: Permission denied
Further, I have tried the following to grant permission to the folder
Code:
sudo chown -R pi:pi /nas
sudo chmod -R 775 /nas
sudo setfacl -Rdm g:pi:rwx /nas
sudo setfacl -Rm g:pi:rwx /nas
any help to solve this would be greatly appreaciated
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jun 03, 2016, 06:58 PM
OK so you are using a NAS mounted drive.
Try this
Code:
touch /home/pi/test
cp /home/pi/test /nas/test
Posts: 5
Threads: 1
Joined: Jun 2016
Reputation:
0
[Solved]
Jun 03, 2016, 07:28 PM
(Jun 03, 2016, 06:58 PM)Mike Wrote: OK so you are using a NAS mounted drive.
Try this
Code:
touch /home/pi/test
cp /home/pi/test /nas/test
permission denied
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jun 03, 2016, 08:28 PM
(This post was last modified: Jun 04, 2016, 07:11 AM by Mike.)
OK, are you able to use another device on your network to copy files to the NAS samba share?
Please show (block out your samba password of course)
and
Posts: 5
Threads: 1
Joined: Jun 2016
Reputation:
0
[Solved]
Jun 05, 2016, 11:19 AM
(This post was last modified: Jun 05, 2016, 11:21 AM by shanix.)
finally back home..
Yes, I can use other devices to write and read files on the samba shares
here we go:
fstab:
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 errors=remount-ro,noatime 0 1
//192.168.1.180/admin /nas cifs defaults,username=admin,password=******** 0 0
and ls -lh /nas
total 0
drwxr-xr-x 2 root root 0 May 1 13:09 Anders
drwxr-xr-x 2 root root 0 May 14 20:18 Demmi
drwxr-xr-x 2 root root 0 Jun 3 18:45 download
drwxr-xr-x 2 root root 0 Jun 3 18:38 Dropbox
drwxr-xr-x 2 root root 0 Jun 2 21:26 film
drwxr-xr-x 2 root root 0 Jun 3 18:47 KODI stuff
-rwxr-xr-x 1 root root 0 Jun 3 20:27 test
drwxr-xr-x 2 root root 0 Jun 2 21:05 usenet
drwxr-xr-x 2 root root 0 Jun 3 20:41 zyfw
drwxr-xr-x 2 root root 0 Jun 3 18:45 zy-pkgs
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jun 05, 2016, 11:46 AM
That ls -lh shows that the /nas folder is owned by root and not pi
Code:
sudo chown -R pi:pi /nas
sudo chmod 775 -R /nas
Posts: 5
Threads: 1
Joined: Jun 2016
Reputation:
0
[Solved]
Jun 05, 2016, 01:23 PM
(This post was last modified: Jun 05, 2016, 02:05 PM by shanix.)
ok, I see..
tried setting up everyhing again, deleted the /nas folder..
then making the folder again, setting the permissions to pi:pi, and the ls -lh lists:
drwxrwxr-x 2 pi pi 1.0K Jun 5 13:54 nas
everything seems fine, but then I add the folder to fstab to mount at boot, and then reboot the pi. the folder is no longer owned by pi, but by root..
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jun 05, 2016, 02:09 PM
(This post was last modified: Jun 05, 2016, 02:12 PM by Mike.)
Interesting, that seems to happen for mounted cifs partitions. The way to fix it is this, you specify the uid and gid for the pi user (which you can find by id -u). The umask=002 part sets 775 permissions
Code:
//192.168.1.180/admin /nas cifs defaults,uid=1000,gid=1000,umask=002,username=admin,password=******** 0 0
Source: http://askubuntu.com/questions/113733/ho...-etc-fstab
Posts: 5
Threads: 1
Joined: Jun 2016
Reputation:
0
[Solved]
Jun 05, 2016, 03:04 PM
Thanks alot, this works with a small modification..
It does not work using umask, will not mount the share to the folder.
But it seems to work whitout the umask setting, nzbget is finally downloading to the shared folder whitout permission errors
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jun 05, 2016, 03:05 PM
yay, thanks for the feedback
|
|
|