RHEL5中不用关闭SELinux而成功开启Samba
发布时间:2023-09-04 15:34:37 所属栏目:系统 来源:
导读:RHEL5中的samba服务器启动后,能看到共享目录,但是不能访问共享目录,告知权限不够。此时可以通过如下命令:
tail /var/log/message看到如此提示:
'/home/lyy' does not exist or permission denied
tail /var/log/message看到如此提示:
'/home/lyy' does not exist or permission denied
RHEL5中的samba服务器启动后,能看到共享目录,但是不能访问共享目录,告知权限不够。此时可以通过如下命令: tail /var/log/message看到如此提示: '/home/lyy' does not exist or permission denied when connecting to [lyy] Error was 权限不够 SElinux is PReventing the samba daemon from reading users home directories.For complete SELinux messages. run sealert -l a0c1c154-bc37-44f5-a6eb-cfc88fed18b9 根据提示运行: sealert -l a0c1c154-bc37-44f5-a6eb-cfc88fed18b9 可看到另外更详细的提示,再根据提示 Allowing access If you want samba to share home directories you need to turn on the 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 运行: setsebool -P samba_enable_home_dirs=1 等运行成功后,就能正常访问目录了。-P参数是永久有效的意思。 注意setsebool放在/usr/sbin中,如果系统提示setsebool命令找不到,加入上述路径即可。 (编辑:汽车网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐