duanjiu1894 2015-06-05 10:02
浏览 79

使用777 httpd服务fedora拒绝权限

I have a computer with Fedora and when I start an httpd service and I try to open a page where I use a simple file_put_contents it says that I haven't enough permissions to do that. So I change the permission of the folder to 777 but it continues to not work.

Same thing happens whit a project made with laravel. When I open index.php in public folder it says that can't do file_put_content in services.json

Does anyone knows why?

Last 10 rows of error log:

[pid 12387] [client 127.0.0.1:50884] PHP Warning:  file_put_contents(/var/www/html/file.txt): failed to open stream: Permission denied in /var/www/html/info.php on line 2
[Fri Jun 05 12:01:48.351406 2015] [mpm_prefork:notice] [pid 12385] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Jun 05 12:01:49.438875 2015] [core:notice] [pid 13460] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri Jun 05 12:01:49.439637 2015] [suexec:notice] [pid 13460] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Jun 05 12:01:49.463336 2015] [auth_digest:notice] [pid 13460] AH01757: generating secret for digest authentication ...
[Fri Jun 05 12:01:49.464443 2015] [lbmethod_heartbeat:notice] [pid 13460] AH02282: No slotmem from mod_heartmonitor
[Fri Jun 05 12:01:49.482226 2015] [mpm_prefork:notice] [pid 13460] AH00163: Apache/2.4.12 (Fedora) PHP/5.6.9 configured -- resuming normal operations
[Fri Jun 05 12:01:49.482278 2015] [core:notice] [pid 13460] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Fri Jun 05 12:02:00.599063 2015] [:error] [pid 13462] [client 127.0.0.1:50902] PHP Warning:  file_put_contents(/var/www/html/file.txt): failed to open stream: Permission denied in /var/www/html/info.php on line 2
[Fri Jun 05 12:02:01.589609 2015] [:error] [pid 13462] [client 127.0.0.1:50902] PHP Warning:  file_put_contents(/var/www/html/file.txt): failed to open stream: Permission denied in /var/www/html/info.php on line 2
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料