Solution ~

Source: Internet
Author: User
Solution ~ -- Linux general technology-Linux technology and application information. for details, refer to the following section. SELinux is Enforcing and vsftp test is installed.
Yum-y install vsftpd
Service vsftpd restart
Chkconfig vsftpd on

Modify context value
Ll-Z/var/www/pub
-Rw-r --. root unconfined_u: object_r: user_home_t: s0 aaa
-Rw-r --. root unconfined_u: object_r: tmp_t: s0 bbb
-Rw-r --. root unconfined_u: object_r: user_tmp_t: s0 ccc
-Rw-r --. root unconfined_u: object_r: public_context_t: s0 ddd

Test results
Lftp 40.1.1.1
Lftp 40.1.1.1:/pub> ls
-Rw-r -- 1 0 0 13 Feb 23 :49 aaa
-Rw-r -- 1 0 0 7 Feb 23 15:39 ccc
-Rw-r -- 1 0 0 18 Feb 23 :40 ddd
Lftp 40.1.1.1:/pub> get aaa
Get: Access failed: 550 Failed to open file. (aaa)
Lftp 40.1.1.1:/pub> get ccc
Get: Access failed: 550 Failed to open file. (ccc)
Lftp 40.1.1.1:/pub> get ddd
18 bytes transferred

Q: Why can I access aaa and ccc without modifying the bool value ??
Why can I see user_home_t, user_tmp_t, and public_context_t, but cannot be downloaded?

Setenforce 0: if SELinux is set to Permissive, abcd can be downloaded. This indicates the SELinux problem, but it is
Why can't I see but cannot download the changed context. I checked some
SELinux information was not answered. It may be worth classification with context: Is the service context value related to the system context value?
I hope you can answer this question for me !!! Thank you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.