does the file itself have the correct permissions?
whats the ouput of:
ls -l /home/[snip]/tmp/uploads/t
Main Topics
Browse All TopicsI'm trying to write to a file, in the simplest way possible. I assume it has something to do with my permission set up, but I have the directory chmod'd to 777, and it still cannot write to it. This might also have to do with my limited knowledge of linux as well.
Anyways, I attached the code below. The error message I get is: "Can't open file: Permission denied"
The directory in question:
/home/[snip]/tmp
drwxrwxrwx 2 nobody andy 4096 Apr 12 16:51 uploads
I've tried changing the owner to the apache user, www-data, myself, nobody, but it doesn't seem to have an effect.
Right now I've actually just been running it through the cmd line with this:
sudo -u www-data ./test.cgi
(note, running as myself works)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
> nixfreak, the file does not exist, it would be created.
sorry, i missed that.
at a minimum the parent directory must have "wx" and "all" the other directories in the pathname must have "x" for the user.
but if you don't give "r" permission on dir for a user he cannot list(ls) the contents of the dir but he can read and write to files in that dir.
Business Accounts
Answer for Membership
by: TintinPosted on 2008-04-12 at 13:16:54ID: 21342349
The permissions on the directories above uploads are also important. They need to have minimum permissions of 755.