Filezilla question permission denied file transfer failed

I'm using amazon web services to host my Ubuntu Lamp stack and I'm new to this (of course).

I installed LAMP and wordpress to use for my website using this tutorial:

I have completed this and everything seems to be running smoothly. I have access to the wordpress dashboard and I am attempting to upload a theme I purchased. Now when I go to upload the theme I get this error:

The uploaded file exceeds the upload_max_filesize directive in php.ini.

So I'm trying to add a php.ini file that increases the max upload size, however when I try to move the file into the /var/www/wp-admin directory I get this error:

Error: /var/www/wp-admin/php.ini: open for write: permission denied
Error: File transfer failed

I am using an EC2 instance on AWS, Host: my ip address, Username: ubuntu, no password and port 22

Any idea what may need to be done here? I have tried numerous ideas from Googling this issue.

2 Answers

Even as the ubuntu user, you cannot write to a directory owned by root.

If you want to do this, you will first have to upload your files to your home directory (i.e. /home/ubuntu/).

From there, you need to SSH into your system, login, then do sudo cp /home/ubuntu/FILENAME /var/www/wp-admin/FILENAME or whatever the command you need to do is, replacing FILENAME with the actual file's name. As well, if you are not copying to /var/www/wp-admin remember to use the correct path instead.

13

I got into this topic because I ran into the same problem.

When I tried to copy files to the server in the /var/www/html/ Filezilla answered me that permission denied. I also needed to create additional folders. And the answer is the same - permission denied.

In search of answers through Google, I found that through SSH I should change access to folder /var/. I've lost a lot of time on this. And it was not necessary.

The solution was simple:

I just needed to connect in Filezilla by SFTP connection on root user.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like