我正在尝试创建一个文件夹chmod to 777但我无法解决。它总是将更改还原为:
File Permissions: 341 Owner/Group: 48 48
只有当我尝试使用PHP创建文件夹时才会发生这种情况。我使用Laravel的mkdir函数。 (参考:http://laravel.com/api/class-Laravel.File.html)如果我用FTP创建文件夹,它会正常工作。
关于其他(可能是重复的)主题的问题;
此脚本输出:
<?php echo "UID = " . getmyuid() . ", User = " . get_current_user(); ?>
//Output: UID = 502, User = TestUser
我使用directadmin作为面板和safe_mode is off.
我该怎么办?
答案 0 :(得分:1)
将这两行更改为您想要的任何用户和组。
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch...
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User _www
Group _www
然后通过键入在Linux上重启你的apache系统;
sudo / usr / sbin / apachectl restart
在Windows上我不知道。