久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      apache如何設(shè)置php權(quán)限

      apache設(shè)置php權(quán)限的方法:1、授予0777文件本身的權(quán)限;2、將所有權(quán)更改為Apache用戶“www-data”并授予所有者寫入權(quán)限;3、將用戶添加到“www-data”組,然后分組寫權(quán)限即可。

      apache如何設(shè)置php權(quán)限

      推薦:《PHP視頻教程》

      具體問題:

      如何給Apache寫入主目錄的權(quán)限?

      我的服務(wù)器在/ 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); ?>

      當(dāng)我嘗試運行這個腳本時,我得到了

      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寫入我的主目錄?服務(wù)器在Fedora 20上運行。

      解決辦法:

      由于您的文件位于主目錄中,我建議使用以下方法之一。

      授予0777文件本身的權(quán)限。

      chmod 0777 /home/djameson/test.txt

      將所有權(quán)更改為Apache用戶www-data并授予所有者寫入權(quán)限。

      Sudo chown www-data:www-data /home/djameson/test.txt chmod 0744 /home/djameson/test.txt

      將您的用戶添加到www-data組或反之亦然將www-data用戶添加到您的組。然后分組寫權(quán)限。

      Sudo usermod -a -G www-data djameson chmod 0764 /home/djameson/test.txt

      注意:我假設(shè)Apache用戶名和組名分別是www-data和www-data。您必須相應(yīng)地更改服務(wù)器Apache用戶名/組名稱。

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號