Spksrc: SABnzbd-Synology "failed to run the package service"

Created on 24 Jul 2016  Â·  25Comments  Â·  Source: SynoCommunity/spksrc

Hi,

im a novice user so please excuse the ignorance.

I have installed SABnzbd on my synology DS1815+ and i keep getting the following message "failed to run the package service". Can someone please help.

dsm 6.0

Most helpful comment

That was more for the maintainers, no problem :)

Regardless, I obviously didn't search the current issue list enough, because there was a fix here that worked for me: https://github.com/SynoCommunity/spksrc/issues/2207#issuecomment-210846195

From what I can tell, when the sabnzbd install script ran, it created the users correctly, but for some reason they weren't added to the /etc/shadow file, which prevents the su command from working correctly.

To resolve this, I manually added the following line to the end of the /etc/shadow file:

sabnzbd:*:10933:0:99999:7:::

@regblade85 you could try amending your /etc/shadow file as described above. Note that you'll need to get SSH access and will need to edit that file as root. If you don't know what this means I wouldn't recommend trying as it would be very easy to make damaging changes to your system. There may be other ways to resolve this issue that don't involve editing that file manually.

I still have an issue with Sabnzbd being unable to write to folders on my volume but I assume I'll have to set up permissions elsewhere, which isn't really a bug.

All 25 comments

I'm having the same issue on a completely fresh DS916+ with DSM 6.0.1-7393 Update 2.

Running the start script manually returns this:

$ /var/packages/sabnzbd/scripts/start-stop-status start
Starting SABnzbd ...
Password: 
su: Permission denied

It seems the script is trying to switch user (su) to the sabnzbd user: su - ${USER} -c "PATH=${PATH} ${PYTHON} ${SABNZBD} -f ${CFG_FILE} --pidfile ${PID_FILE} -d"

Just running su - sabnzbd as root manually results in the same permission denied error:

# su - sabnzbd
su: Permission denied

Looking at the PAM config, according to its documentation, the pam_unix.so extension only allows users that have a password set to use su. I assume the sabnzbd user doesn't and probably shouldn't have a password set, so maybe the PAM configuration needs to change instead?

# cat /etc/pam.d/su
auth     sufficient     pam_rootok.so
auth     sufficient     pam_unix.so
account  sufficient     pam_unix.so
session  sufficient     pam_unix.so

Maybe the the PAM configuration changed in a recent DSM update? This is a little out of my wheelhouse, andI've only just got my NAS yesterday, so not sure if this is the right track.

Im going to be completely honest.....i have no idea what you just said. Im a novice with no development back ground.

Reg Kumar

On 26 Jul 2016 9:47 am, at 9:47 am, Henry Singleton [email protected] wrote:

I'm having the same issue on a completely fresh DS916+ with DSM
6.0.1-7393 Update 2.

Running the start script manually returns this:

$ /var/packages/sabnzbd/scripts/start-stop-status start
Starting SABnzbd ...
Password: 
su: Permission denied

It seems the script is trying to switch user (su) to the sabnzbd user:
su - ${USER} -c "PATH=${PATH} ${PYTHON} ${SABNZBD} -f ${CFG_FILE} --pidfile ${PID_FILE} -d"

Just running su - sabnzbd as root manually results in the same
permission denied error:

# su - sabnzbd
su: Permission denied

Looking at the PAM config, according to its documentation, the
pam_unix.so extension only allows users that have a password set to
use su. I assume the sabnzbd user doesn't and probably shouldn't have a
password set, so maybe the PAM configuration needs to change instead?

# cat /etc/pam.d/su
auth     sufficient     pam_rootok.so
auth     sufficient     pam_unix.so
account  sufficient     pam_unix.so
session  sufficient     pam_unix.so

Maybe the the PAM configuration changed in a recent DSM update? This is
a little out of my wheelhouse, andI've only just got my NAS yesterday,
so not sure if this is the right track.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/SynoCommunity/spksrc/issues/2416#issuecomment-235120549

That was more for the maintainers, no problem :)

Regardless, I obviously didn't search the current issue list enough, because there was a fix here that worked for me: https://github.com/SynoCommunity/spksrc/issues/2207#issuecomment-210846195

From what I can tell, when the sabnzbd install script ran, it created the users correctly, but for some reason they weren't added to the /etc/shadow file, which prevents the su command from working correctly.

To resolve this, I manually added the following line to the end of the /etc/shadow file:

sabnzbd:*:10933:0:99999:7:::

@regblade85 you could try amending your /etc/shadow file as described above. Note that you'll need to get SSH access and will need to edit that file as root. If you don't know what this means I wouldn't recommend trying as it would be very easy to make damaging changes to your system. There may be other ways to resolve this issue that don't involve editing that file manually.

I still have an issue with Sabnzbd being unable to write to folders on my volume but I assume I'll have to set up permissions elsewhere, which isn't really a bug.

This is where my noobness is going to come out. Have you got instructions to do this please?

Reg Kumar

On 26 Jul 2016 12:36 pm, at 12:36 pm, Henry Singleton [email protected] wrote:

That was more for the maintainers, no problem :)

Regardless, I obviously didn't search the current issue list enough,
because there was a fix here that worked for me:
https://github.com/SynoCommunity/spksrc/issues/2207#issuecomment-210846195

From what I can tell, when the sabnzbd install script ran, it created
the users correctly, but for some reason they weren't added to the
/etc/shadow file, which prevents the su command from working
correctly.

To resolve this, I manually added the following line to the end of the
/etc/shadow file:

sabnzbd:*:10933:0:99999:7:::

@regblade85 you could try doing the same then going to Package Control
and attempting to "Run" the sabnzbd package again.

I still have an issue with Sabnzbd being unable to write to folders on
my volume but I assume I'll have to set up permissions elsewhere, which
isn't really a bug.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/SynoCommunity/spksrc/issues/2416#issuecomment-235145767

@henrysingleton are you using root as the user?

This is my output when I try the script ./start-stop-status start

Starting SABnzbd ... ./start-stop-status: line 22: PATH=/usr/local/sabnzbd/bin:/usr/local/sabnzbd/env/bin:/usr/local/python/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin /usr/local/sabnzbd/env/bin/python /usr/local/sabnzbd/share/SABnzbd/SABnzbd.py -f /usr/local/sabnzbd/var/config.ini --pidfile /usr/local/sabnzbd/var/sabnzbd.pid -d: No such file or directory

Btw sabz is working for me now

Reg Kumar

On 3 Aug 2016 6:50 pm, at 6:50 pm, madvtak [email protected] wrote:

This is my output when I try the script ./start-stop-status start

Starting SABnzbd ...
./start-stop-status: line 22:
PATH=/usr/local/sabnzbd/bin:/usr/local/sabnzbd/env/bin:/usr/local/python/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
/usr/local/sabnzbd/env/bin/python
/usr/local/sabnzbd/share/SABnzbd/SABnzbd.py -f
/usr/local/sabnzbd/var/config.ini --pidfile
/usr/local/sabnzbd/var/sabnzbd.pid -d: No such file or directory


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/SynoCommunity/spksrc/issues/2416#issuecomment-237173523

@henrysingleton Adding the line to the /etc/shadow file worked fine for me. Thanks for the tip!

Adding the line worked for me too! Thanks!

I added the line to /etc/shadow, and sab worked, however the changes got reverted automatically and sab was no longer able to start. Any way to make the changes to /etc/shadow persistent?

@mnathani Not sure, I assume this is a recent change in a newer version of dsm. I've been hesitant to upgrade because of something like this. Did it overwrite the changes to /etc/shadow after a reboot?

As an alternative, you could run sabnzbd as root, but I would recommend against it for security reasons.

The changes to /etc/shadow got reverted even before reboot.

Hey Henry
I added the line to the shadow file, but I'm still getting the permission denied error.
How can I check whether the sabnzbd user was created at all?

DSM 6, DS414

Best regards

ok starting it via ./start-stop-status start results in the error, but I can start it via GUI in package center.
Thank you very much for the hint

Hi,

I'm having a similar issue. I recently bought a Synology DS216j, and I'm trying to set SABnzbd up on it. I've installed the package, and at first it wouldn't even run. After doing some searching, I found a couple of sites that suggested adjusting the start-stop-status file so that it said USER="root", which worked. It allowed SABnzbd to run.

Now, the problem with this approach is that from what I can tell, it will run fine and download files fine, and even execute whatever post-processing script I choose without issue. However, the resulting files seem to have no permissions on them. I've even changed the setting within SABnzbd in Config/Folders so that it runs chmod 0777 on the file. This works, in the sense that it runs... but instead of it changing the permissions on the file to rwxrwxrwx, it changes them to rw-rw----. So my media server box, which is connected using an account I created (cunningly called media_server), is unable to see or do anything with the file. In order to watch these files on my tv, I need to manually adjust the permissions, which defeats the purpose of automating the download.

What I'd like to do is be able to run SABnzbd under the media_server account, but nothing I've tried has worked. In the GUI, I've allowed that account access to SABnzbd, and tried adjusting the start-stop-status file to run under that account, but it still won't start unless I run it as root.

What am I missing?

As a temporary workaround, I have created a user called apps and added it to the group users, then set the script to use that user. Go to /var/packages/sabnzbd/target and run chown apps:users . -R

That sounds very similar to what I've done. My account is called media_server, and it's added to the "users" default group automatically. I just tried your suggestion about the chown command, but it didn't help - it still gave me the "failed to run package" error.

As a workaround, what I've done is created a scheduled task the runs every 5 minutes, and executes this command:

find /volume1/"TV Shows" -type d -not -perm 777 -exec chmod 777 {} \;

It's not really the solution I'd like, but it'll do until I figure out why it's not letting me run it under any user account. I figure it should let me choose whatever account I want to run it under, but it seems to disagree.

I've just setup a new Synology and installed SABnzbd. At first, I only needed to add the sabnzbd user to the /etc/shadow file and then everything was working.

But now after a reboot, it no longer works. When I say, /var/packages/sabnzbd/scripts/start-stop-status start, it tells me that the user sabnzbd does not exist.

So as per advice above, I made the sabdnzbd user, I've added it to the "Users" and "sc-download" group, changed ownership (cd /var/packages/sabnzbd/target, sudo chown -R sabnzbd:sc-download .)

But now when I try to start it, it asks me for the sudo password , but I just get the error "_su: Permission denied_". Also, it doesn't start via the GUI.

So what am I missing, how can I get this working again.

Have you seen this?

https://www.htpcguides.com/configure-couchpotato-usenet-torrents/

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Veldkornetnotifications@github.com
Sent: Monday, 24 April 2017 9:43 PM
To: SynoCommunity/spksrcspksrc@noreply.github.com
Cc: regblade85reg.kumar@hotmail.com; Mentionmention@noreply.github.com
Subject: Re: [SynoCommunity/spksrc] SABnzbd-Synology "failed to run the package service" (#2416)

I've just setup a new Synology and installed SABnzbd. At first, I only needed to add the sabnzbd user to the /etc/shadow file and then everything was working.

But now after a reboot, it no longer works. When I say, /var/packages/sabnzbd/scripts/start-stop-status start, it tells me that the user sabnzbd does not exist.

So as per advice above, I made the sabdnzbd user, I've added it to the "Users" and "sc-download" group, changed ownership (cd /var/packages/sabnzbd/target, sudo chown -R sabnzbd:sc-download .)

But now when I try to start it, it asks me for the sudo password , but I just get the error "su: Permission denied". Also, it doesn't start via the GUI.

So what am I missing, how can I get this working again.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/SynoCommunity/spksrc/issues/2416#issuecomment-296631265, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATq3dYUTpfv62jdf8_t-OiVZ2ONi61ijks5rzIrSgaJpZM4JTk0L.

I wonder if this package is still installing and running on DSM 5? I plan to downgrade to DSM 5.2.

Yes, it still works perfectly on DSM 5.x

That said, I don't think it'll be long now before we have the user scripts sorted to get DSM 6 compatible (at least with the testing/beta package)

Hi, that sounds great. If im completely wrong about this, please correct me: You developers are really doing a great job with spksrc but it seems to me synology has failed completely to support you with technical help since they come up with DSM 6. They must be stupid not to honor what you do for attractiveness of their nas. I hope, my english is understandable at least. I know, they make the big money with their big nas and this community is more directed towards the home users, but i still think they are stupid with not showing enough respect for the work you developers do for the community in your spare time.

Thanks for the vote of confidence. We are still working on the DSM 6.x support, and we finally have some tool chains released to work with. Time is our only enemy now!

It's not so easy to downgrade from 6.1.1, so i just did a reset of 6.1.1 for a fresh start, keeping my data. So far i only installed nzbget and did manually create the necessary user and permissions befor installing the package: https://github.com/SynoCommunity/spksrc/issues/2526#issuecomment-300251008

It works but i understand after doing it myself, that user creation is different now with DSM 6.

Closing due to age. Test-packages for DSM6.1 and new architectures available here: #3138.
Those will later be published to the real package rep.

Was this page helpful?
0 / 5 - 0 ratings