mkdir Permission拒绝php脚本

时间:2014-08-28 21:03:35

标签: php

我想制作和删除目录,以及带有php脚本的文件

示例:

<?php
if (!is_dir('examples')) {
    mkdir('examples');
}
?>

但我得到了许可否认。如何允许这一个脚本运行这些命令? 我试过chmod 777 mkdir.php和chmod + s mkdir.php 摆脱了Permission denied meaage,但它仍然没有创建文件夹。

我怎样才能让mkdir()和/或rmdir()php函数工作?

请注意,我没有使用php作为shell脚本。

1 个答案:

答案 0 :(得分:1)

可能只是向用户展示。 (我刚刚来这里给答案''找到'答案') 原文:

777, if the user www-data isn't the owner of the parent directory or not in the same group as the owner. Usually it would be 775, tho.

归功于Charlotte Dunois

相关问题