我不能设置0777作为文件权限,因为owner/group是48 / 48


I can't set 0777 as file permissions because owner/group is 48 48

我试图创建一个文件夹chmod到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.

我该怎么办?

在httpd.conf文件中将这两行更改为您想要的任何用户和组。

# 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类系统上输入;

sudo/usr/sbin/apachectl restart