13) Use FileZilla to transfer files from Windows

<-- Previous    Next –>

You need to be able to upload files to the web server. One way is to use FileZilla using your SSH connection rather than an ftp connection.  FileZilla is a free to download application that uses drag and drop and is quite easy to use .

Download and install FileZilla from https://filezilla-project.org/

The web pages are normally located at /www/var/html/ although if you are using a USB flash drive as described above, you may have moved this to another location which in my example is /websites/www/html/

The user that you use to login with SSH needs to own the files.

So if we go into the Terminal and change directory to /www/var/html/ and then type:

ls -l

you may see that the owner:group is root:root

The above command lists the files and directories with full details.

If you try to connect using FileZilla and try to upload a file, it will give permissions denied.

To overcome this we set the owner of the files using:

sudo chown -R username:group directory

In our example, we need to set the user and group to the Apache user and group which in our case is www-data:www-data

So to change the user, group we do:

sudo chown -R www-data:www-data /var/www/html/

Or if we are using the USB Flash drive we do:

sudo chown -R www-data:www-data /websites/www/html/

 

<-- Previous    Next –>