有些”事情”雙手無法掌握也許對某些人來說!~
“是銷魂的”~但是…..我….T___T 哀
這陣子一直被我可愛的小白苦惱著…
我知道我的小白他很努力了!!~但是他那種無法用雙手掌握的狀況
實在讓我吃不消!! 看到這裡…別想太多!!小白他…
只是我的 Linux Server !!
最近 SELinux 一直跳出一封錯誤訊息~~一夜之間可以累積上萬封
幾乎吃掉我約45~50%的資源!!讓我一度有衝動~
想轉回可愛又可恨的 WIN 2000 至少這是我第一次接觸SERVER的視窗
只是!!WIN的安全性實在讓人不可小看!!
但是 Linux 我無法完全掌握住的情形實在讓我很厭惡(只能自嘆技術不足)
但回想 Linux 的優點我還是忍著吧!!
訊息如下:

Summary
SELinux is preventing sshd (sshd_t) "append" to <Unknown> (var_log_t).
Detailed Description
SELinux is preventing sshd (sshd_t) "append" to <Unknown> (var_log_t). The
SELinux type var_log_t, is a generic type for all files in the directory and
very few processes (SELinux Domains) are allowed to write to this SELinux
type. This type of denial usual indicates a mislabeled file. By default a
file created in a directory has the gets the context of the parent
directory, but SELinux policy has rules about the creation of directories,
that say if a process running in one SELinux Domain (D1) creates a file in a
directory with a particular SELinux File Context (F1) the file gets a
different File Context (F2). The policy usually allows the SELinux Domain
(D1) the ability to write or append on (F2). But if for some reason a file
(<Unknown>) was created with the wrong context, this domain will be denied.
The usual solution to this problem is to reset the file context on the
target file, restorecon -v <Unknown>. If the file context does not change
from var_log_t, then this is probably a bug in policy. Please file a
http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against the selinux-policy
package. If it does change, you can try your application again to see if it
works. The file context could have been mislabeled by editing the file or
moving the file from a different directory, if the file keeps getting
mislabeled, check the init scripts to see if they are doing something to
mislabel the file.
Allowing Access
You can attempt to fix file context by executing restorecon -v <Unknown>
The following command will allow this access:
restorecon <Unknown>
Additional Information
Source Context system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Context unconfined_u:object_r:var_log_t:s0
Target Objects None [ file ]
Affected RPM Packages
Policy RPM selinux-policy-3.0.8-44.fc8
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name plugins.mislabeled_file
Host Name localhost.localdomain
Platform Linux localhost.localdomain 2.6.23.1-42.fc8 #1 SMP
Tue Oct 30 13:55:12 EDT 2007 i686 i686
Alert Count 106913
First Seen 西元2008年06月29日 (週日) 09時33分49秒
Last Seen 西元2008年07月13日 (週日) 08時31分18秒
Local ID 2ca00d6c-8711-4f36-a5e4-f3a9b26adfc7
Line Numbers
Raw Audit Messages
avc: denied { append } for comm=sshd dev=sda1 name=btmp pid=14502
scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tclass=file
tcontext=unconfined_u:object_r:var_log_t:s0
********************************************************************
最後因為暫時找不出原因在哪...
只好先停用 SELinux 暫時解決吃掉大量資源的窘境!!
不過這不是解決方法....我還是乖乖去爬文吧!!
如果有哪位大大!!知道這該如何解決~煩請告知小弟解決方法吧!!感恩
順帶一提!!聽說 FREEBSD 也是個好物!!說不定會找空機來研究看看
到時就得麻煩常常來這裡逛的"鬼哥"幫個忙指導一下吧
鬼哥!!他可是UNIX高手唷!!~

天才事務所
WilliamTai