Topic "WinSCP 5.7.7 - Operation not permitted"

Author Message
trumpy81
[View user's profile]

Joined: 2016-04-02
Posts: 4
Location: Brisbane, Australia
GDay All,

I have used WinSCP to access my Synology NAS for some time now and have been very very happy with it. But a recent update to DSM 6.0 has left me with no way to set file/folder permissions in WinSCP, it returns 'Operation not permitted' with the option to abort etc.

With DSM 6.0, and using PuTTY, I must first log in as admin and then issue sudo -s, I am then asked for the password (I use the same PW as for admin) and then I am allowed 'root' access to the NAS.

In DSM 5 and earlier I could simply log in as user 'root' right from the start but this is no longer possible.

Anyhow, the question is, how can I correct this situation with WinSCP so that I can once again set file/folder permissions?

Any help/ideas much appreciated.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Please read documentation:
http://winscp.net/eng/docs/faq_su

If that does not help, come back.
trumpy81
[View user's profile]

Joined: 2016-04-02
Posts: 4
Location: Brisbane, Australia
Thanks for the help!

Unfortunately, that didn't help.

I tried to add sudo -s in the SCP/Shell page but that did not work.

I also tried to edit /etc/sudoers but that didn't work either.

At one point while in VI it presented a message telling me that there was a sudoers.swp file.

I'm not Linux savvy enough to understand what that meant though ... lol
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
"that did not work" won't help us understand what went wrong.

Also you have to understand that you try to break security restrictions of your server. You cannot expect that this will be user-friendly.
trumpy81
[View user's profile]

Joined: 2016-04-02
Posts: 4
Location: Brisbane, Australia
OK, when entering sudo -s in SCP/Shell and then trying to login I get a password box appear, I enter my admin password and it returns 'access denied'.

In vi, when I tried to write the file, I got permission denied.
trumpy81
[View user's profile]

Joined: 2016-04-02
Posts: 4
Location: Brisbane, Australia
After making a complete mess of things and having to re-install DSM Sad

I was able to successfully do the following:

1. In PuTTY Log on as admin using my admin password.
2. sudo -su root and entered my admin password
3. cd /etc
4. cp sudoers /volume1/Plex (convenient location)
5. cp sudoers sudoers.bak
5. Edit sudoers via WinSCP and edit command
6. Added the following to the sudoers file
7. %administrators ALL=NOPASSWD: ALL, save file
8. cp -f /volume1/Plex/sudoers sudoers
9. Open WinSCP and edited my shortcut

file protocol = scp
host name = IP address
port = configured port number in DSM
user name = admin
password = admin password

Then click on advanced/advanced and for SCP/Shell add sudo -su root

Now I can open WinSCP and have root access to the files which allows me to set file permissions once again ... yay Smile

Thanks to prikryl for supplying the link to the guide that made it all possible, thanks!

PS: I hate vi ... Laughing
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License