Tutorial :Can't access uploaded files or files written by php


I'm having a problem with my server at work, it's not letting me access any files via FTP that were uploaded or created by PHP, like log files and user uploads. I CAN access them via HTTP.

Server - Apache/1.3.41 (Unix)

This is a big problem for me, and I feel like it must be some server configuration because this doesn't happen elsewhere. I am going to call our "server guy" and try to get him to correct this, but first I wanted to see if anyone had any clues about what might be going on before I do so - as he was a real pain to work with in the past and not eager to help.


If I had to guess, it's probably because when you upload files, the web server itself is writing those file to the disk, hence the files end up with the web-server's user permissions which are different from yours. If you need to be able to modify those files, have your php app chown() them to a group you have access to and chmod() them accourdingly.


It's most likely a permissions issue; the user ftp is running as doesn't have permission to access the files that were created by the php/web user.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »