I would like to share a tip, frequently we need modify protected files (i.e. in an Ubuntu box) from WinSCP remotely, but sometimes that is impossible.
If you have a non-privileged user and want to edit a root protected file of an Ubuntu box but with WinSCP, you can do it with a few changes.
– Ubuntu 11.04
– Non-privileged user: chilcano
– Any S.O. but with WinSCP 4.3.6 (http://winscp.net)
1. In the server side add this line to /etc/sudoers
chilcano@sso1:/$ sudo nano /etc/sudoers and
[...] #### added chilcano ALL=NOPASSWD: /usr/lib/openssh/sftp-server
2. In the client side open WinSCP and do the following
Check SFTP protocol in WinSCP and Add customized command to sftp-server in Ubuntu
Open as ROOT from WinSCP
I hope this help you.