Edit files with WinSCP on Ubuntu 14.04

0

1

How I can edit files with WinSCP on Ubuntu 14.04? Since I can not login as root or elevate privileges

Error: Permissions Denied, you can not overwrite the file

Pablo

Posted 2014-06-30T16:38:10.890

Reputation: 1

Answers

0

you can only edit files you have the Write right to. If the file you wish to edit does not permit you the rights you seek, you must contact the system administrator.

if you need to alter the permissions on the file to allow write and you have SSH access and sudo capability, you can use

sudo chmod o+w /path/to/file

and then revert it later with:

sudo chmod o-w /path/to/file

Frank Thomas

Posted 2014-06-30T16:38:10.890

Reputation: 29 039

0

If you can't elevate perms, you have one other possible choice. Remember that if you have write permissions to a directory, you can add/rename files there.

IF you have perms to the directory I'd do something like:

edit /path/to/file/filename.new

mv /path/to/file/filename /path/to/file/filename.sav
mv /path/to/file/filename.new

If you don't have perms to the directory, and you don't have ability to elevate perms, you're SOL.

Rich Homolka

Posted 2014-06-30T16:38:10.890

Reputation: 27 121