Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

http://iampuneet.com/wordpress-amazon-ec2/

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
Thank you, now how do I upload the files to my home directory? –  anthony Sep 6 '13 at 0:05
    
Well, I just gave you the directory to upload to for the ubuntu user: /home/ubuntu. If the username is something else, say, ant, then the home directory is /home/ant/. –  Thomas W. Sep 6 '13 at 4:17
    
Hey thanks i understand this now. But, the file I was trying to upload did not solve the problem, can I do it with the entire theme instead? Upload to ubuntu then copy to var/wp-content/themes? –  anthony Sep 6 '13 at 23:15
    
Yes, you should be able to do that, however if you are having issues with permissions or files on wordpress, you might want to get help from a more specific site, such as the WordPress Answers site here on stackexchange. Ask Ubuntu is good for helping to resolve issues with the Ubuntu OS, but not necessarily wordpress issues. –  Thomas W. Sep 6 '13 at 23:21
    
ok I will head over to their forum then, thanks Thomas –  anthony Sep 7 '13 at 0:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.