Method for successfully starting samba without disabling selinux in rhel5
Source: Internet
Author: User
In rhel5, the method for successfully starting samba without disabling selinux-Linux Enterprise Application-Linux server application information is described below. 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.
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.