Cant write to directory when not logged in as root

0

I am switching a site over to amazon ec2 and the pages that allow a user to upload a file to a directory arent working. When Im logged in as root via ssh I can 'touch' a new file to there but not when Im logged in as my normal user profile. It still says

touch: cannot touch `test.txt': Permission denied

I've done chmod 755 -R n

n is the directory, in /var/www/html Do I have to change something else somewhere?

user718229

Posted 2012-12-31T20:30:30.640

Reputation: 103

Have you tried chmod 777? Might not make a difference, but worth a shot. – Sam – 2012-12-31T20:31:30.510

Answers

0

Try checking the ownership of /var/www/html/n. If permissions are 755, only the owner can add files there. Also, if test.txt already exists, check who owns it. If the files are owned by root, use chown to change the owner to your normal account.

cpast

Posted 2012-12-31T20:30:30.640

Reputation: 2 279