零零社区|百姓的网上家园-互动交流平台!(0.0)=^_^=(00社区)

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz

RHEL5中不用关闭SELinux而成功启动Samba

2013-4-7 10:56| 发布者: 123456000000| 查看: 13| 评论: 0

摘要: RHEL5中的samba服务器启动后,能看到共享目录,但是不能访问共享目录,告知权限不够。此时可以通过如下命令: tail /var/log/message看到如此提示: '/home/lyy' does not exist or permission denied when connecti ...
 

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>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命令找不到,加入上述路径即可。


路过

雷人

握手

鲜花

鸡蛋

相关阅读

发表评论

最新评论

相关分类


Archiver|手机版|小黑屋|00社区

GMT+8, 2023-1-31 10:50 , Processed in 0.042885 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部