开发者

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜