Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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`

Ive done chmod 755 -R n

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

share|improve this question
Have you tried chmod 777? Might not make a difference, but worth a shot. – Sam Dec 31 '12 at 20:31
Thanks this worked too. – user718229 Dec 31 '12 at 23:45
up vote 0 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .