Hey,
Sound like an ownership issue due to once running a command as the incorrect user. So, I’m going to stick with the examples I used in the video for this.
Firstly, make sure you’re trying to run the composer command as magento
User.
Next, from within /var/www/html
, run ls -la
to check ownership permissions. (You can do this as either User craig
or user magento
because you’re just checking something). It should look like this, where User magento
is the file owner:
If you see this, then you’ve screwed up somewhere:
So, to reset the file ownership of the /var/www/html
directory, you must do the following:
- Switch to your superuser (i.e.
craig
):su craig
- Reset file/folder ownerships:
sudo chown -R magento:www-data /var/www/html/
Never run any commands within
/var/www/html
, unless you’re switched over to themagento
User. Otherwise, if I run a command ascraig
User then it will overwrite my file/folder permissions.
Filezilla
- Open Site Manager (top left icon)
- Press New Site button
- Protocol: SFTP
- Host: Server IP
- Login Type: Normal
- User: This is the user you setup for Magento (i.e.
magento
) - Password: This is the password for the
magento
User - For convenience, you could also set your Default remote directory. This makes Filezilla automatically open the
/var/www/html
when you login rather. - Click Ok to save.