[synology] user permissions & renamer issues

Most commonly asked questions will have thire awnsers here, please search before asking!
kbh71
Junior Member
Posts: 5
Joined: 16 Dec 2014 13:25
Status: Offline

Re: [synology] user permissions & renamer issues

Postby kbh71 » 17 Dec 2014 10:30

How do I start a service (like Transmission, for example) from the command line?

kbh71
Junior Member
Posts: 5
Joined: 16 Dec 2014 13:25
Status: Offline

Re: [synology] user permissions & renamer issues

Postby kbh71 » 17 Dec 2014 10:35

OK, I worked out how to start it from command line.

It says: su: unknown user transmission

Presumably that's because I changed the user back to "transmission" (which it was originally) - although there was never a "transmission" user.

Is there something I need to add back to one of the common files?

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: [synology] user permissions & renamer issues

Postby clinton.hall » 17 Dec 2014 11:13

Where you did

Code: Select all

cd /volume1/@appstore
chown -R apps:users couchpotatoserver headphones sabnzbd sickbeard transmission


To reverse you need to do

Code: Select all

cd /volume1/@appstore
chown -R couchpotatoserver:couchpotatoserver couchpotatoserver
chown -R headphones:headphones headphones
chown -R sabnzbd:sabnzbd sabnzbd
chown -R sickbeard:sickbeard sickbeard
chown -R transmission:transmission transmission


See if that makes any difference...

kbh71
Junior Member
Posts: 5
Joined: 16 Dec 2014 13:25
Status: Offline

Re: [synology] user permissions & renamer issues

Postby kbh71 » 17 Dec 2014 12:01

It says:

chown: unknown user/group transmission:transmission

kbh71
Junior Member
Posts: 5
Joined: 16 Dec 2014 13:25
Status: Offline

Re: [synology] user permissions & renamer issues

Postby kbh71 » 17 Dec 2014 12:28

Clinton - I followed your original instructions again, and it all works now.

Thanks for your help with this - not sure what I did wrong in the first place.

maximang
Junior Member
Posts: 1
Joined: 17 Dec 2014 19:52
Status: Offline

Re: [synology] user permissions & renamer issues

Postby maximang » 17 Dec 2014 20:12

At the first step, I have to create a user, or a group? If it is a user, what about the password?

I only use Couchpotato Custom ; is there a method to simply give the user right to the Couchpotato account?

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: [synology] user permissions & renamer issues

Postby clinton.hall » 17 Dec 2014 21:39

I reposted the original instructions after a user informed me... I don't have a Synology NAS so I can't answer with confidence here...

jsaddiction
Junior Member
Posts: 3
Joined: 21 Mar 2013 11:49
Contact:
Status: Offline

Re: [synology] user permissions & renamer issues

Postby jsaddiction » 31 Dec 2014 17:08

Does anyone know by chance why editing the start-stop-status for NZBget causes it not to start at all? does this package require special steps?

User avatar
clinton.hall
Moderator
Posts: 9224
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Contact:
Status: Offline

Re: [synology] user permissions & renamer issues

Postby clinton.hall » 31 Dec 2014 21:38

if you make edits that create an error, this would prevent it running.
what did you use to edit the file.... do not use notepad on windows as this stuffs up the line endings... instead using notepad++ or similar.

jsaddiction
Junior Member
Posts: 3
Joined: 21 Mar 2013 11:49
Contact:
Status: Offline

Re: [synology] user permissions & renamer issues

Postby jsaddiction » 01 Jan 2015 06:06

i am on synology so i am making edits through SSH with the VI command. i broke down and backed up the databases and uninstalled couch and headphones. uninstalled GIT and then reinstalled GIT on volume1. after that i reinstalled couch and headphones. so far all is well except headphones will not transcode FLAC to MP3 with original settings. throwing some errors trying to hunt down a solution for that now. Couchpotato didn't want to accept the config file so i loaded a clean config file and configured through the GUI and now Couchpotato works flawlessly!

Happy New Year

st0len44
Junior Member
Posts: 1
Joined: 23 Feb 2015 02:25
Status: Offline

Re: [synology] user permissions & renamer issues

Postby st0len44 » 23 Feb 2015 02:29

Followed the instructions and it worked a charm! Thanks. Whenever the app is updated, I imagine I have to change the USER back to apps, right?

I also had to give subfolders Read/Write access to the apps user through Synology file station, despite chown-ing /Downloads/*

Tiuri2000
Junior Member
Posts: 1
Joined: 11 Apr 2015 22:05
Status: Offline

Re: [synology] user permissions & renamer issues

Postby Tiuri2000 » 11 Apr 2015 23:13

Just went through the tutorial clinton.hall wrote on my Synology DS215j with DSM version DSM 5.1-5022 Update 4, which i'm happy to say works!
The tutorial had left some questions unanswered for the unfamiliar linux users, like myself, i'll attempt answering them for now to answer some of the questions from the other users in this thread, also including some linux tips.

I've been doing these steps from PuTTY (download can be found here) which needs to be logged in as root, doing the steps with the admin account doesn't work!
Also i used the vi command to edit the files, usage on vi can be found here.
Another thing to keep in mind when using linux commands is that practically everthing is case sensitive!

Now for step 1.
When creating a user it doesn't really matter which password you choose, the reason for this is that the system will run the user with a su command (su=substitute user), this command doesn't require any knowledge of the password.

Something odd i ran into with the /etc/passwd file, when you create a user and remove it afterwards for any reason, it's possible the /etc/passwd file will keep a line from the previously (identically named) user, if you would add the same user again it would have two lines and having both can cause problems, which i found while running through the steps.
Easiest way is to check for lines with identical user id's, these aren't allowed to exist twice!

To determine the user id for the user you created you can use the following command:

Code: Select all

root> id -u apps
1030

Also, if you have a different username then you need to alter the home folder location in the path that is present in the /etc/passwd file /var/services/homes/apps, the bold text is the username.

The resulting line should be something like this, substituting your username apps with your chosen username and the user id with the 1030 number in my example.

Code: Select all

apps:x:1030:100:account description:/var/services/homes/apps:/bin/sh


Now for step 5.
These commands reflect to the folders you assign ownership to with the chown command (chown=change ownership), the folders in the example downloads/* media/* are an example only, make sure you enter your folders which you created for your applications, in my case i used very different folder naming and had to update the command to reflect this.
Adding this might seem obvious however it's easy to miss and i something to keep in mind.

If you are a user who uses a usb drive for storing logs then you will need to run the chown command on those folders as well to make sure the applications can properly write to them.
To do so go throuh the same steps as in step 5 but use the cd (change directory) command to go to your usb drive, for example:

Code: Select all

cd /volumeUSB1/usbshare
chown -R apps:users logs/*

It's easy to forget that you might have these so i just wanted to point this out. Of course the folder locations might vary per system and per user who created the folders, so make sure you check the folder names using the DSM File Station app or from the ssh prompt (in PuTTY) using the ls -al command (ls=list), this will show you all files and folders in the folder your currently in, to know in which folder you are use the command pwd (pwd=print working directory).


Now i'm done writing for the time being, however it was fun to learn some new stuff and hopefully this information can be of use to someone.

Thank you clinton and others posting here!

r4dd3
Junior Member
Posts: 1
Joined: 16 Apr 2015 18:01
Status: Offline

Re: [synology] user permissions & renamer issues

Postby r4dd3 » 16 Apr 2015 18:03

it's important to stop the apps in the package manager before starting the modification!

mattcafc
Junior Member
Posts: 3
Joined: 23 Apr 2015 19:42
Status: Offline

Re: [synology] user permissions & renamer issues

Postby mattcafc » 26 Apr 2015 17:00

Hi All,

I've searched hi and low for a solution. Here's my issue I posted in another thread

"I've setup Couchpotato today on my Synology Nas to work alongside Plex today and I'm loving it so far.

My one problem I have come across is when setting up Couchpotato it cannot see all my folder on my nas. When i search for a destination folder to download to it can see \volume1\video but then cannot see my folder called \movies\ which has my collection in.

I have the same problem for the renamer."

I know post 1 in this thread is the solution, however, I am a windows based user and not an expert on any of this to be honest. I do have my has setup fine and managed to install couch potato and set it up. However, reading steps in post 1 is too confusing for me, I don't even understand how I perform the tasks mention?

Am I supposed to copy and paste the code somewhere to perform the actions?

Can someone help me, knowing I'm an absolute beginner at this. Thanks!

marlowe310
Junior Member
Posts: 5
Joined: 11 Sep 2013 02:10
Status: Offline

Re: [synology] user permissions & renamer issues

Postby marlowe310 » 04 May 2015 21:28

I'm having an odd issue -- I tried this method out, and it worked for everything except CouchPotato/CouchPotato-Custom (tried both), and Headphones -- basically, as soon as I reassigned permissions, both apps would seem to work, but would fail once restarted, and never be able to run again.

I assumed it was an updating issue, since that seems to trigger the crash/inability to recover.

Now I just want to restore the original way it works, but everytime I reinstall, Headphones quickly becomes unable to restart (the others seem okay, at least for now). I've even gone so far as to reinstall the Synology OS (twice now), and still the issue seems to persist.

Can someone walk me through how to undo all changes to Headphones? What could be causing the crash? Do I need to fix the apps \bin
sh back to the original state?

Thanks much, really appreciate any help.

Tomino
Junior Member
Posts: 1
Joined: 18 Jun 2015 23:18
Status: Offline

Re: [synology] user permissions & renamer issues

Postby Tomino » 18 Jun 2015 23:20

I have a very strange issue. Everything goes fine following the instructions, but once I restart my station, the apps user is just gone... evetyrhing from /etc* files is also gone and the files that I changed permissions have instead of "apps" user id "1029" ...

Any ideas?

houdini3367
Junior Member
Posts: 7
Joined: 08 Aug 2012 07:06
Contact:
Status: Offline

Re: [synology] user permissions & renamer issues

Postby houdini3367 » 29 Jul 2015 06:09

I've gotten this setup to work, except I use Sonarr (nzbdrone) instead of sickbeard and the nzbdrone package won't start. All other services start fine. Has anyone else experienced this?

hullebull
Junior Member
Posts: 1
Joined: 09 Aug 2015 16:35
Status: Offline

Re: [synology] user permissions & renamer issues

Postby hullebull » 09 Aug 2015 16:49

Hi!

I have try to get this to work for a while now and read all of your post.
But i am not super good at this stuff. I have manage to do the step 1-3 but then problem starts for me:)
Where do i find the files to edit for the rest of the steps? or should i do something else?
I use WinSCP for connection to the NAS, and use notepad++ for edit.
Please if somebody just will try to explain this in a little bit easyier way?

sqwadldr
Junior Member
Posts: 1
Joined: 15 Jan 2016 14:16
Status: Offline

Re: [synology] user permissions & renamer issues

Postby sqwadldr » 15 Jan 2016 14:24

Sorry to dig up an old post.

I was just wondering why I can get Sickrage, Sabnzbd, and Sonarr all to be able to move and rename files with no problems, but I need to do all the stuff in the first post to get CP to work? I am not really comfortable using commands on my synology, and was wondering if there would be a fix in a future release that would have CP working from the beginning?

Thanks

Zendar
Junior Member
Posts: 1
Joined: 25 Jan 2016 00:01
Status: Offline

Re: [synology] user permissions & renamer issues

Postby Zendar » 25 Jan 2016 00:09

Hi there,

i followed the instructions point by point. When i'm trying to manually start the apps with step 11), i'm getting the error ""failed to run the package". Same with all apps.

Update: When trying to start Sabnzbd from the command line, i'm getting the error:

Code: Select all

su: can't chdir to home directory '/var/services/homes/apps'
su: can't run /sbin/nologin: No such file or directory


So it seems it's missing the home directory that is entered in step 3). I'll try to look into what can be done to fix that, don't want to try the suggestion made here:https://couchpota.to/forum/viewtopic.php?f=6&t=1477#p10451, as it seems to have caused severe issues.

Update2: Okay, i have been able to solve the issues:

1) regarding the user home error, you just have to activate the "user homes" feature in the advanced tab in "users" in the DSM
2) regarding the sbin-error, after following the steps i had 2 entries in the passwd like this:

#apps:x:1029:100:Programme:/var/services/homes/apps:/sbin/nologin
apps:x:1029:100::/var/services/homes/apps:/bin/sh


After removing the first line (or commenting it out with a "#" at the beginning), it has been working again. Need to check though if indeed it's working well now so far. It seems though that Sonarr (nzbdrone) lost all it's settings/library.

Update3: Just to complete the Sonarr config-issue: When creating the home-folder for "apps", Sonarr automatically switches the "appdata directory" to the new home folder. It does not move the configuration though. This has to be done manually. To do so, move the content of

/usr/local/nzbdrone/var/.config/NzbDrone/


to the new home folder:

/var/services/homes/apps/.config/NzbDrone/


and you should be good to go.

Cheers,
Zendar


Return to “FAQ”