Samba is successfully started in RHEL5 without SELinux being disabled.

Source: Internet
Author: User
Article Title: Samba is successfully started in RHEL5 without disabling SELinux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

After the samba server in RHEL5 is started, the shared directory is displayed, but the shared directory cannot be accessed, notifying you that the permission is insufficient. Run the following command:

Tail/var/log/message:

'/Home/lyy' does not exist or permission denied when connecting to [lyy] Error was permission is insufficient

SELinux is preventing the samba daemon from reading users home directories. For complete SELinux messages. run sealert-l a0c1c154-bc37-44f5-a6eb-cfc88fed18b9

Run as prompted:

Sealert-l a0c1c154-bc37-44f5-a6eb-cfc88fed18b9

You can see more detailed prompts, and then follow the prompts

Allowing Access

If you want samba to share home directories you need to turn on

Samba_enable_home_dirs boolean: "setsebool-P samba_enable_home_dirs = 1"

The following command will allow this access:

Setsebool-P samba_enable_home_dirs = 1

Run:

Setsebool-P samba_enable_home_dirs = 1

After running successfully, you can access the directory normally. The-P parameter is permanently valid.

Note that setsebool is placed in/usr/sbin. If the system prompts that the setsebool command cannot be found, add the above path.

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.