Log into your EC2 instance via SSH as ec2-user than SU to root user and enter this command:
chown -R ec2-user /path/to/files
(Authenticate as the root user first.)
Log into your EC2 instance via SSH as ec2-user than SU to root user and enter this command:
chown -R ec2-user /path/to/files
(Authenticate as the root user first.)