dongzhi6905 2013-04-16 13:54
浏览 116
已采纳

我无法将0777设置为文件权限,因为所有者/组是48 48

I am trying to create a folder chmod it to 777 but I'm unable to it. It always reverts changes to:

File Permissions: 341 Owner/Group: 48 48

It only happens when I try to create a folder using PHP. I use Laravel's mkdir function. (Ref: http://laravel.com/api/class-Laravel.File.html) It works normally if I create folder with FTP.

As asked on other (probably duplicate) topics;

This script outputs:

<?php echo "UID = " . getmyuid() . ", User = " . get_current_user(); ?>
//Output: UID = 502, User = TestUser

I use directadmin as panel and safe_mode is off.

What should I do?

  • 写回答

1条回答 默认 最新

  • dtrj21373 2013-04-16 18:40
    关注

    in your httpd.conf file change those 2 lines to any user and group you want.

    # 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
    

    then restart your apache on linux like system by typing ;

    sudo /usr/sbin/apachectl restart

    on windows I dont know.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办