I have an EC2 instance and in it I use WordPress. To edit WordPress plugins and themes files I use WinSCP.
The problem is that if I try to edit a file via WinSCP I get the following error message:
Upload of file 'index.php' was successful, but error occurred while setting the permissions and/or timestamp.
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
Permission denied . Error code: 3
Error message from server: Permission denied
I know it happens because I'm logged in with the
And the folder permissions to WordPress work perfectly are:
drwxrwsr-x 2 apache www 4096
Since I can not simply change the owner of the
/var/www as would cause the lost WordPress write permissions, how can I solve this?