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