




免費預覽已結(jié)束,剩余1頁可下載查看
下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
chcon命令:修改對象(文件)的安全上下文。比如:用戶:角色:類型:安全級別。命令格式:Chcon OPTIONS CONTEXT FILES.Chcon OPTIONS reference=PEF_FILES FILES說明:CONTEXT 為要設置的安全上下文FILES 對象(文件)-reference 參照的對象PEF_FILES 參照文件上下文FILES應用參照文件上下文為我的上下文。OPTIONS 如下:-f強迫執(zhí)行-R遞歸地修改對象的安全上下文-r ROLE修改安全上下文角色的配置-t TYPE修改安全上下文類型的配置-u USER修改安全上下文用戶的配置-v顯示冗長的信息 -l, -range=RANGE 修改安全上下文中的安全級別范例:1、ftp/If you want to share files anonymously chcon -R -t public_content_t /var/ftp/If you want to setup a directory where you can upload files如果你想讓你設置的FTP目錄可以上傳文件的話,SELINUX需要設置chcon -t public_content_rw_t /var/ftp/incoming/You must also turn on the boolean allow_ftpd_anon_write 允許匿名用戶寫入權(quán)限setsebool -P allow_ftpd_anon_write=1/If you are setting up this machine as a ftpd server and wish to allow users to access their home directororiessetsebool -P ftp_home_dir 1/If you want to run ftpd as a daemonsetsebool -P ftpd_is_daemon 1/You can disable SELinux protection for the ftpd daemonsetsebool -P ftpd_disable_trans 12、httpd/If you want a particular domain to write to the public_content_rw_t domainsetsebool -P allow_httpd_anon_write=1orsetsebool -P allow_httpd_sys_anon_write=1/httpd can be setup to allow cgi s to be executed setsebool -P httpd_enable_cgi 1/If you want to allow access to users home directoriessetsebool -P httpd_enable_homedirs 1chcon -R -t httpd_sys_content_t user/public_html/httpd is allowed access to the controling terminal允許httpd訪問終端setsebool -P httpd_tty_comm 1/such that one httpd service can not interfere with anothersetsebool -P httpd_unified 0/loadable modules run under the same context as httpdsetsebool -P httpd_builtin_ing 0/httpd s are allowed to connect out to the networksetsebool -P httpd_can_network_connect 1/ You can disable suexec transitionsetsebool -P httpd_suexec_disable_trans 1/You can disable SELinux protection for the httpd daemon by executing setsebool -P httpd_disable_trans 1service httpd restart3、named/If you want to have named update the master zone files setsebool -P named_write_master_zones 1/You can disable SELinux protection for the named daemon by executingsetsebool -P named_disable_trans 1service named restart4、nfs/If you want to setup this machine to share nfs partitions read onlysetsebool -P nfs_export_all_ro 1/If you want to share files read/writesetsebool -P nfs_export_all_rw 1/If you want to use a remote NFS server for the home directories on this machine如果你想要將遠程NFS的家目錄共享到本機,需要開啟setsebool -P use_nfs_home_dirs 15、samba/If you want to share files other than home directoriechcon -t samba_share_t /directory/If you want to share files with multiple domains如果samba服務器共享目錄給多個域,則需要:setsebool -P allow_smbd_anon_write=1/If you are setting up this machine as a Samba server and wish to share the home directoriessamba服務器要共享家目錄時:setsebool -P samba_enable_home_dirs 1/If you want to use a remote Samba server for the home directories on this machine如果你需在本機上使用遠程samba服務器的家目錄setsebool -P use_samba_home_dirs 1/You can disable SELinux protection for the samba daemon by executing關(guān)閉selinux關(guān)于samba的進程守護的保護setsebool -P smbd_disable_trans 1service smb restart6、rsync/If you want to share files using the rsync daemon共享rsync目錄時:chcon -t public_content_t /directories/If you want to share files with multiple domains允許其他用戶寫入時setsebool -P allow_rsync_anon_write=1/You can disable SELinux protection for the rsync daemon by executing停止rsync的進程保護setsebool -P rsync_disable_trans 17、kerberos/allow your system to work properly in a Kerberos environment允許系統(tǒng)使用kerberossetsebool -P allow_kerberos 1/If you are running Kerberos daemons kadmind or krb5kdcsetsebool -P krb5kdc_disable_
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 專項9 語言表達(解析版)
- 人教版六年級語文上冊教學計劃(含進度表)
- 3.4升華和凝華 說課稿2025年初中人教版物理八年級上冊
- 《舞蹈解剖學》全套教學課件
- 檢察院和銀行合作協(xié)議
- 正畸助手應聘簡歷
- 文化設施土地轉(zhuǎn)讓居間合同
- 保齡球館裝修解除協(xié)議
- 企業(yè)信息化建設規(guī)章制度草案
- 特色農(nóng)業(yè)產(chǎn)業(yè)規(guī)劃
- 2025年南京信息職業(yè)技術(shù)學院單招職業(yè)傾向性測試題庫參考答案
- 高考語文復習:觀點思辨類高考作文寫法指導 課件
- 2025年浙江名校協(xié)作體高三語文2月聯(lián)考作文題目解析及范文:“向往”的“苦處”與“樂處”
- 化學實驗室安全培訓教案
- 罪錯未成年人專門教育制度的解構(gòu)與再塑
- 2025年不定期勞動合同樣本(2篇)
- 2024年浙江特殊教育職業(yè)學院高職單招語文歷年參考題庫含答案解析
- 小學家長進課堂講安全知識
- 2025屆高考英語二輪專題復習與測試專題三完形填空第一講八大技法破解完形填空課件
- 第一單元項目1《設計互聯(lián)網(wǎng)簡歷》說課稿 2024-2025學年安徽版(2024)初中信息技術(shù)七年級上冊
- 2024年西安航空職業(yè)技術(shù)學院單招職業(yè)技能測試題庫標準卷
評論
0/150
提交評論