FrostByte 5052 Posted September 19, 2019 Share Posted September 19, 2019 (edited) Posting this for people who like myself are new to Unix/Synology and want to use WinSCP with write/delete capabilities to have more control when managing their Emby server from a Windows machine. Warning!! Once you've done this you will have administrator access using WinSCP all the way to the root folder of your NAS and you can really mess things up if you're not sure what your're doing. 1. Reset superuser privileges on NAS. This will also stop the sudo command from prompting administrators for a password in order to work with WinSCP. Open DSM Control Panel Click Task Scheduler Create a task General tab: (Uncheck "Enabled") Task Settings tab: text version of "Run command" field (copy/paste the information below to be safe): cat <<EOF > /etc/sudoers Defaults syslog=authpriv root ALL=(ALL) ALL %administrators ALL=NOPASSWD: ALL EOF chmod ug=r,o= /etc/sudoers (Click "OK") Then run the new task you just created*: (Click "Yes") * You may need to run the task again after every DSM update as Synology tends to reset these privileges themselves --- 2. Enable SSH on NAS Open DSM Control Panel Click Terminal & SNMP Terminal tab: (Check "Enable SSH service" and then click "Apply") --- 3. Setup WinSCP Download and install WinSCP on Windows machine https://winscp.net/eng/download.php Allow WinSCP to start Login box: File protocol: SCP Host name: enter the NAS host name or IP address Port number: enter the port number from step 2 User name: "admin" Click "Login" Password: use your admin password Edited October 25, 2021 by FrostByte Added WinSCP advanced settings 3 Link to comment Share on other sites More sharing options...
crusher11 854 Posted May 6, 2020 Share Posted May 6, 2020 What exactly is step one doing? Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted May 6, 2020 Author Share Posted May 6, 2020 Basically, it's what is going to allow your admin account to log into the NAS as root which was locked down in DSM6. DSM updates tend to reset this back thus the script is there so you can rerun it after an update. You can use WinSCP without it though Link to comment Share on other sites More sharing options...
crusher11 854 Posted May 6, 2020 Share Posted May 6, 2020 I'm trying to copy my old collections across and I'm getting an "access denied" error which I assume is related though? That step just seems to remove all passwords or something which doesn't seem super secure or anything. Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted May 6, 2020 Author Share Posted May 6, 2020 That just prevents sudo from prompting WinSCP for the password. You enter your admin password in the box provided by WinSCP. It doesn't eliminate the need for a password though I would just skip step 1 for now and see what you can/can't do using WinSCP and your admin account without that step. Link to comment Share on other sites More sharing options...
crusher11 854 Posted May 6, 2020 Share Posted May 6, 2020 Like I said I'm getting an "access denied" error trying to copy my collections across. Link to comment Share on other sites More sharing options...
FrostByte 5052 Posted May 6, 2020 Author Share Posted May 6, 2020 Thus step 1 Link to comment Share on other sites More sharing options...
crusher11 854 Posted May 6, 2020 Share Posted May 6, 2020 I tried that, it's still saying "Permission denied" when I try to copy across. I closed WinSCP and reopened it and logged back in after running the script. However, I'm logged in with my username not as "admin", because it denies access when I try to log in as "admin". Link to comment Share on other sites More sharing options...
Aussiedroid 56 Posted December 14, 2020 Share Posted December 14, 2020 (edited) Thanks a lot for posting this information @FrostByte I can access the Emby folders again! .. but I am hitting the same issue as @crusher11, even after performing step 1. I can copy files/folders from the /Emby/data/collections directory, but if I try to copy something back it does not allow it (Access Denied). I have tried to edit directly from the NAS too (rather than via Windows PC), but same issue when I try to save. I can copy files to the /Emby master folder but not the sub folders it seems. I am logged in with Admin user, but the owner of the files/folders is the Emby user. I assume this may be why it is preventing me from updating the file? Have tried to log in with the Emby user instead but I am not sure what the password would be as I don't recall ever setting this user up. Would you know of a way to get around this issue? Can I simply perform a password update/reset in DSM for Emby user and then log in via WinSCP with the new password (or could this break the Emby Server)? or Can I grant write access to the Admin user somehow while retaining Emby user as the owner? Do I need to set R/W permissions somewhere else perhaps? As a bit of a novice with this stuff, I am not sure how best to proceed. Appreciate any advice before I inadvertently break something Thank you, AD Edited December 14, 2020 by Aussiedroid Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now