How to edit file through SFTP with Filezila
My server is running a Lemp stack with ubuntu 18.04, following different tutorials, I created a new user, gave it root permissions and disable root login.
I’m trying to edit some files in /var/www/mywpsite.com/ which was working as root but isn’t working as my user.
I tried to :
chown -R myusername /www/
chmod -R 775 /var/www/
but FileZilla still gives me that error:
Status: Starting download of /var/www/mywpsite.com/wp-content/themes/mytheme-child/header.php
Command: cd “/var/www/mywpsite.com/wp-content/themes/understrap-child”
Response: New directory is: “/var/www/mysite.com/wp-content/themes/mytheme-child”
Command: get “header.php” “/header.php”
Error: local: unable to open /header.php
Error: Critical file transfer error
When ls -l in /var/www I got
drwxrwxr-x 5 username www-data 4096 Oct 14 23:34 mywpsite.com
What should I do to be able to open the files with Filezilla modify them locally and re-upload them on the server? Thank you.