Errors uploading CodeIgniter Website to Amazon EC2
Solution 1:
By default, ec2-user (the default Amazon AMI user) lacks permissions to the /var/www directory. To fix it, use:
usermod -a -G www-data ec2-user
This will add your ec2-user to apache's group so you can make the edits. Root is unable to log in via SSH by default (this can be adjusted, though) so this will work as a workaround. If the apache user is different, change www-data
to the appropriate user.