Linux Samba服务器只能创建文件 不能打开文件和创建文件夹问题的解决方法
前几天想配置一个Samba服务器 这样就能在服务器上用可视化的开发工具写Linux下面的代码了 就很方便了(如果你说使用Linux下的编辑器也很方便 那我就不能说什么了)可是我搞了三四个小时都没有搞好 Samba用户密码 和 共享目录都设置好了 在Windows下也能访问了 可是只能在上面建立文件 不能建立文件夹和和打开文件 起初以为是目录的权限不对 又开始折腾权限 后来怎么搞都不对 搞到半夜快一点了 没办法 明天还要上班 休息 第二天下班到家后又开始搞 去网上查资料 最后终于找到问题的原因了 是SELinux搞的鬼 关于SeLinux的详细信息
点击这里
SeLinux
关闭这个安全模块就行了
关闭方法:修改配置文件 /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
将黑色字体部分 设置为 disabled就可以了 然后保存退出 如果还不行 重新启动一下 试试 配置文件的位置不知道是不是其他版本的系统是否一样 我用的 RedHat Linux Enterprise 5
![分享 分享](https://i-blog.csdnimg.cn/blog_migrate/390ed5364aa5828f3f994083c5c9ee64.gif)
关闭方法:修改配置文件 /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
将黑色字体部分 设置为 disabled就可以了 然后保存退出 如果还不行 重新启动一下 试试 配置文件的位置不知道是不是其他版本的系统是否一样 我用的 RedHat Linux Enterprise 5