Permission denied… [Samba share]

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
pjmeli
Newbie
Newbie
Posts: 9
Joined: June 1st, 2019, 4:09 pm

Permission denied… [Samba share]

Post by pjmeli »

Sabnzbd 2.3.9 running from source on RaspberryPi 3 (Raspian Stretch 9)

Sabnzbd is running as user pi

Folders are owned by pi, group access to pi, folder permissions 777

Directory is a network NAS share

I get this error:

Code: Select all

Error while adding Swamp.Thing.2019.S01E09.The.Anatomy.Lesson.720p.DCU.WEB-DL.AAC2.0.H264-NTb-RakuvArrow.nzb, removing
Traceback (most recent call last):
  File "/home/pi/sabnzbd/sabnzbd/dirscanner.py", line 223, in ProcessSingleFile
    nzo_info=nzo_info, url=url, reuse=reuse, dup_check=dup_check)
  File "/home/pi/sabnzbd/sabnzbd/nzbstuff.py", line 749, in __init__
    os.mkdir(adir)
OSError: [Errno 13] Permission denied: '/mnt/media/Downloads/incomplete/[some file].nzb/__ADMIN__'
SAB adds the job folder to /incomplete and then emits the error

Baffling, as it seems like SAB has an open path to write the download.

Any ideas anyone?
Hydranet
Newbie
Newbie
Posts: 20
Joined: March 10th, 2012, 6:07 pm

Re: Permission denied…

Post by Hydranet »

Check the settings of the share on the NAS(samba/nfs), it is possible that the share is configured read only on
the NAS side.
pjmeli
Newbie
Newbie
Posts: 9
Joined: June 1st, 2019, 4:09 pm

Re: Permission denied…

Post by pjmeli »

Check the settings of the share on the NAS(samba/nfs), it is possible that the share is configured read only on
the NAS side.
The share works fine from my OSX machine with guest access. ie I can write to the directory(s)

Something with permissions is amiss, I tried nzbget and am having similar issues

Regards,
Paul
Hydranet
Newbie
Newbie
Posts: 20
Joined: March 10th, 2012, 6:07 pm

Re: Permission denied…

Post by Hydranet »

what type of share(nfs/samba?) is it? Guessing samba?
Last edited by Hydranet on July 27th, 2019, 12:30 pm, edited 1 time in total.
pjmeli
Newbie
Newbie
Posts: 9
Joined: June 1st, 2019, 4:09 pm

Re: Permission denied…

Post by pjmeli »

what type of share(nfs/samba? is it? Guessing samba?
It's a samba share.

From OSX as a guest user I can write to any of the directories except the mountpoint, and I can delete files from any directory.

From the Raspberry Pi I can write to the directories but I can't delete except thru the command line using sudo and I can't put anything in the trash in the GUI file manager.

Edit: Sabnzbd is able to enter the incomplete downloads directory but unable to write the download or its enclosing folder. The behavior with nzbget is similar. It has to be a permissions issue but I have the remote share mounted as guest.

From the Pi GUI the directories are owned by pi and sabnzbd is running as user=pi.

I'm trying to find the samba config on the NAS (XigmaNAS - used to be NAS4Free) but its well hidden in the UI and find didn't find it from the command line.

Regards,
Paul
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Permission denied…

Post by sander »

pjmeli wrote: July 27th, 2019, 11:57 am

The share works fine from my OSX machine with guest access. ie I can write to the directory(s)

So ... let your raspi access the NAS as guest (not as pi) ... ?

(FWIW: Samba access rights is a PITA)
pjmeli
Newbie
Newbie
Posts: 9
Joined: June 1st, 2019, 4:09 pm

Re: Permission denied… [Samba share]

Post by pjmeli »

So ... let your raspi access the NAS as guest (not as pi) ... ?
The share is mounted as guest already (in fstab).

I've changed the Owner of all of my media to pi in my NAS with 777 access to see what happens.

Nothing changed wrt OSX, now on to experiment further with the Pi.

I switched to a Pi to download content instead of using a Jail on the NAS. My system got borked a couple of times and it appeared to happen during Jail updates so I decided to off-load the media downloading/management.

It had been working for a month or two when I pulled the ethernet cable to work on another system. When I restarted the Pi sabnzbd no longer worked so I reinstalled, then my NAS wouldn't mount automatically with the same fstab entry I had before.

It's been whack-a-mole ever since.

Regards,
Paul
pjmeli
Newbie
Newbie
Posts: 9
Joined: June 1st, 2019, 4:09 pm

Re: Permission denied… [Samba share]

Post by pjmeli »

******Update fwiw:

I finally got SAB working. NzbGet also for that matter.

Operating through a guest account for Samba didn't look like it was going to happen on my Pi, so I added a credentials option to my fstab that provided my samba user and samba password on startup:

Code: Select all

,credentials=/home/pi/.smbcredentials,
The .smbcredentials file contained two lines:

username=pi
password=<password>

Restarted SAB and the errors the errors disappeared.

Thanks everyone for the help.

Regards,
Paul
Hydranet
Newbie
Newbie
Posts: 20
Joined: March 10th, 2012, 6:07 pm

Re: Permission denied… [Samba share]

Post by Hydranet »

I was going to suggest that but glad you already thought of it yourself :) Really strange the samba configuration with guest on your NAS creates different results from different clients though.
Post Reply