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 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)