簡體   English   中英

chmod()[function.chmod]:權限被拒絕

[英]chmod() [function.chmod]: Permission denied

我的項目需要協助。 我創建了chmod <?php chmod("../database.php",0777); ?> <?php chmod("../database.php",0777); ?>位於安裝文件夾中,則dabase.php位於根目錄中。 我在用哥達迪。 我嘗試使用Filezilla並輸入777或755來設置權限,但是從ftp filezilla中得到了一些錯誤:

Command:    CWD /
Response:   250 CWD command successful.
Command:    SITE CHMOD 777 install
Response:   500 'SITE CHMOD 777 install': command not understood
Status: Retrieving directory listing of "/"...
Status: Directory listing of "/" successful
Status: Set permissions of '/install/1.php' to '777'
Command:    CWD /install
Response:   250 CWD command successful.
Command:    SITE CHMOD 777 1.php
Response:   500 'SITE CHMOD 777 1.php': command not understood

而且,Godaddy文件管理器中沒有用於頁面隱私設置的選項來設置權限。 並且我還為chmod所在的文件夾設置了權限。

這是數據庫文件中的代碼:

    <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$db['default']['username'] = "usernamedb";
$db['default']['password'] = "mypassword";
$db['default']['database'] = "mydb";

$db['default']['hostname'] = "localhost";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
$active_group = "default";
$active_record = TRUE;

注意:代碼的信息實際上並不是我的密碼和用戶名等,以保護我的隱私。

這是我得到的錯誤:

警告:chmod()[function.chmod]:第2行的D:\\ Hosting \\ 11924492 \\ html \\ install \\ 1.php中的權限被拒絕

希望任何人都能幫助我。

謝謝

Oldskool是正確的,您實際上不應該使用777。但是,問題的症結在於您試圖在Windows環境中使用chmod (線索是您的PHP文件的路徑: D:\\Hosting\\11924492\\html\\install\\1.php )。 chmod是一個Unix命令。

看起來GoDaddy確實為您提供了一種通過其控制台在Windows計算機上編輯文件權限的方法: https : //www.godaddy.com/help/set-directory-permissions-windows-6481

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM