开发者

Can't access uploaded files or files written by php

开发者 https://www.devze.com 2023-01-08 12:00 出处:网络
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

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

精彩评论

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