开发者

PHP Script: mkdir permission denied - best way to handle customer support?

开发者 https://www.devze.com 2023-04-12 14:28 出处:网络
I sell a PHP script that needs to make some directories. Now I know that I can just tell the user to chmod the directory to 777, but that doesn\'t seem very secure. Is there another (safe) way? These

I sell a PHP script that needs to make some directories. Now I know that I can just tell the user to chmod the directory to 777, but that doesn't seem very secure. Is there another (safe) way? These are novice users that have bought a PHP script, so I cannot expect them to configure apache differently, most are on shared hosts anyway.

The script is creating thumbnails of an image d开发者_运维百科irectory the user supplies. Since it's apache that creates the files, it probably needs 777? Is there any way around chmod that is easy for users to do?

Thanks, Wesley


[Which path is the php script supposed to create directories into?]

You just need the path to belong to the user who runs the php script, then the permission could simply be 700 instead of 777.

0

精彩评论

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