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 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?