Fedora, SELinux, apache, vsftpd, and ReiserFS

Source: Internet
Author: User
Tags 403 forbidden error
Fedora, SELinux, apache, vsftpd, and ReiserFS-Linux general technology-Linux technology and application information. For details, see the following. Problems encountered when configuring the server under Fedora Core. The problem with apache is that the specified Directory always has a 403 forbidden error, and the anonymous access to the anon_root Directory specified by vsftpd always says that you have no permission to access the Directory. This error occurs because SELinux is enabled for Fedora Core and the security policy does not allow applications to access those directories and files.

Here are a few introductions to SELinux: Introduction to the FAQ of Fedora Core, Introduction to translation, ibm developworks, and how to build a SELinux system on your own.

According to my understanding, the cause of the problem is that the httpd process runs in its own domain (similar to chroot, a process is restricted to a directory, it can only access files belonging to this domain. The file is determined by the specific label on the file system.

The solution to the problem is to use chcon for specific directories and files to label the files (this should be appropriate, and the formal statement should be security context ). First use ls-Z to check the labels of the files and directories where the access is normal. For example,/var/www is system_u: object_r: httpd_sys_content_t, and then use

Chcon-R-h-t httpd_sys_content_t

. -R is recursive, and-h does not follow the symbolic link. In this way, apache should be able to access this file and directory. The vsftpd solution is similar.

However, when I perform this operation on ReiserFS, there is always an error, saying that this operation is not supported and there is no problem with ext3. SELinux cannot be used on ReiserFS. In the server Kernel configuration, the POSIX_ACL and FS_SECURITY of ReiserFS are matched, but the problem still exists. I don't know if SELinux is not available yet.

(SELinux is still unknown, so I will modify it later .)
Related Article

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.