Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.