如何授予apache写入主目录的权限?
我的服务器在 /var/www/html 中,我在 /var/www/html/fileio_test/io_test.php 中有一个 php 脚本
<?php
$logging = <<< LOG
This is a test
LOG;
$testfile = fopen('/home/djameson/test.txt', 'a');
fwrite ($testfile, $logging);
fclose($testfile);
?>
当我尝试运行此脚本时,我得到
Warning: fopen(/home/djameson/test.txt): failed to open stream: Permission denied in /var/www/html/fileio_test/io_test.php on line 7
Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/fileio_test/io_test.php on line 8
Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/html/fileio_test/io_test.php on line 9
如何让 apache 写入我的主目录?服务器在 fedora 20 上运行。