(感動)找這份文件找真的很久 因為卡在這裡真的很久,找書找不到相關內容 網路也找了很久,都是把SELinux關掉等等方法 SELinux不應該被關掉! 因為他也幫我檔了很多網路的嘗試攻擊 像是useradd危險的動作...等等 --------------------------------------------------------------- 在這裡我先交代一下openwebmail的安裝 如果已經安裝了,請跳過這段 關於openwebmail的設定,你可以參考官方的文件 http://dslab.ee.ncku.edu.tw/~tung/openwebmail/install.html (以下內容部分節錄自官方文件) 作業系統:Fedora Core 9為例 照官方文件設定,在 [root@webmail ~]# /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init 之後 本機瀏覽 http://localhost/cgi-bin/openwebmail/openwebmail.pl 會出現以下錯誤 無法寫入 /var/log/openwebmail.log! (Permission denied) 請繼續往下看 ---------------------------------------------------------------------------------------------- 以下內容引用網址:http://www.blueshop.com.tw/board/show.asp?subcde=BRD200606051501341I7&fumcde=FUM20050110200903ZWZ&rplcnt=10 在文字模式下打入以下指令 [root@webmail ~]#touch /var/log/openwebmail.log [root@webmail ~]#chcon -u system_u /var/log/openwebmail.log [root@webmail ~]#chcon -t httpd_sys_script_rw_t /var/log/openwebmail.log [root@webmail ~]#chcon -t httpd_unconfined_script_exec_t [root@webmail ~]#/var/www/cgi-bin/openwebmail/openwebmail* 指令說明 touch /var/log/openwebmail.log <==這是產生一個log檔 chcon -u system_u /var/log/openwebmail.log <==這是修改檔案使用者權限 chcon -t httpd_sys_script_rw_t /var/log/openwebmail.log <==這是修改寫入權限 chcon -t httpd_unconfined_script_exec_t var/www/cgi-bin/openwebmail/openwebmail* <==這是修改檔案由什麼套件專用 這些都是因為SELinux造成的,原本檔案、目錄權限只有使用檔案前面那串(rwxrwxrwx),在使用SELinux後,會多出一種管理context type,context type會限制該目錄、檔案的使用原則,所以,在使用有安裝SELinux時,常常會出現apach、ftp明明都設定好了,卻還是不能使用,多半出問題,都是SELinux在做怪。 感謝原作大大,難解的linux終於有solution了
創作者介紹
創作者 清新下午茶 的頭像
Johnny 鋼鍊

清新下午茶

Johnny 鋼鍊 發表在 痞客邦 留言(7) 人氣( 5933 )