红联Linux门户
Linux帮助

Linux Samba服务器只能创建文件,不能打开文件和创建文件夹问题的解决方法

发布时间:2008-09-22 21:17:51来源:红联作者:Dywesz
前几天想配置一个Samba服务器,这样就能在服务器上用可视化的开发工具写Linux下面的代码了,就很方便了(如果你说使用Linux下的编辑器也很方便,那我就不能说什么了)可是我搞了三四个小时都没有搞好。 Samba用户密码,和共享目录都设置好了,在Windows下也能访问了,可是只能在上面建立文件,不能建立文件夹和和打开文件,起初以为是目录的权限不对,又开始折腾权限,后来怎么搞都不对,最后终于找到问题的原因了,是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。
文章评论

共有 1 条评论

  1. uncleon 于 2008-10-12 10:25:18发表:

    学习了。。。(5ty(