解决samba和SELINUX 冲突
在使用Samba进行建立Window与Linux共享时,要是不能访问,出现“您可能没有权限使用网络资源”,
在Linux 中,可執行下列指令:
setsebool -P samba_enable_home_dirs on
參考文件: /etc/samba/smb.conf
#---------------
# SELINUX NOTES:
# 分享群組
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# 分享home目錄
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# "samba-share_t" so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--------------
#
最新文章
- ASP.NET MVC一次删除多笔记录
- jquery-fullpage-js制作页全屏滚动插件
- php中的循环遍历 foreach list each
- [Everyday Mathematics]20150110
- iOS 新特性关键字
- eclipse中误删了servers文件
- EditText 空指针问题
- jdk1.6与1.7垃圾回收
- Codeforces Round #277.5 (Div. 2)B——BerSU Ball
- java提高篇(十二)-----equals()
- Hybird应用开发实践(一)使用原生/cordova混合项目
- SSM 整合 quartz JDBC方式实现job动态增删改查记录
- C#查找字符串位置
- js常见input校验
- 1. Ubuntu下MongoDB的安装和使用
- redis-3.0.0_rc5的RPM包制定
- 专访周金可:我们更倾向于Greenplum来解决数据倾斜的问题
- scrapy实战--爬取最新美剧
- Kafka设计解析(六)Kafka高性能架构之道
- navicat连接mysql出现1251错误