Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission Denied when trying to write to files

Status
Not open for further replies.

KyleReed

IS-IT--Management
Feb 15, 2005
2
US
This looks like for security reasons, but from what I've read it says the user must be logged into the server and the permissions has to be set for writing to a file.

The permissions is a no brainer, but how does php expect me to write files from a mail form or even a messageboard forum on the fly without an authorized user logged in?

I don't see how this could work at all, does fopen require accesssing a database like mysql?

Thanks,

Kyle frustrated
 
The web server is a user like anyone else. The end use of the web application has nothing to do with the server (that would be disastrous). So basically the web server has to have permissions to write to the server.

If the directory doesn't allow you to write to it, try creating one through your web application so it becomes the owner, then you should by able to write in that directory. If your web server doesn;t have write permissions on any server in the doc root, check with the sys admin to grant permissions.
 
I can only access my server remotely, so I would have to go to my sys admin, and their tech support is the worst, ssggghhheeeessh

The thing I don't understand is I could write to files in perl all day long, but php won't let me. Is php more encrypted?
 
No, I'm suprised that this is the case. If perl can write to the files php should be able to. Can you confirm that they would run in the same unux user and that they are both either CGI or module based (assuming apache here).
Finally can you post a small snippet that doesn't work please
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top