Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS EC2 FTP / HTML

I really don't know much about Apache, I followed some tutorials and installed the LAMP stack. I can successfully ftp to /home/ec2-user and upload files there but I want to be able to upload files to the /var/www/html or just have somewhere where I can upload files to the web with my account.

Sorry if my question is not very helpful but I'm not educated enough on servers to provide more information. Ask me questions and I will do my best.

like image 720
mkral Avatar asked Jun 29 '12 20:06

mkral


1 Answers

First make sure you can write to the documentroot (/var/www/html in this case) The default groups for user "ec2-user" on EC2 is "ec2-user" & "wheel"

Either give user "ec2-user" ownership of /var/www/html with the following command

sudo chown -R ec2-user /var/www/html

Or group "wheel" ownership and write permissions

sudo chgrp -R wheel /var/www/html
sudo chmod g+w /var/www/html

Second step is to set your FTP client (Filezilla, CyberDuck, ...) to default to /var/www/html or create a symbolic link in the home directory ec2-user pointing to docroot.

ln -s /var/www/html ~/docroot

When you authenicate on your ftp client, just doubleclick on what looks like the "docroot" folder.

One caveat is that your DocumentRoot may not be configured as /var/www/html, please check your configurations in /etc/httpd/conf.d/*.conf labeled with "DocumentRoot".

like image 131
Richard Ginsberg Avatar answered Nov 03 '22 10:11

Richard Ginsberg