centos 7 apache суулгасан юм. Permission denied гээд болдогүй юунд байгаа юм бол.
chown -R test apache:apache test
chmod -R 777 test
/var/www/html/test/test.php
$handle = fopen('file.txt', 'w') or die('Cannot open file: file.txt');
error log
PHP Warning: fopen(file.txt): failed to open stream: Permission denied in /var/www/html/test/test.php on line 5
ps -ef | grep httpd
root 3194 1 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3197 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3198 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3199 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3200 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3201 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3205 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3206 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
apache 3207 3194 0 23:16 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
root 3598 1485 0 23:23 pts/0 00:00:00 grep --color=auto httpd