Linux下samba配置笔记

这两天一直在研究配置samba,由于是菜鸟所以遇到的问题可能比较可笑,在这里写下一些问题的解决办法,今天把samba安装好后rpm -qa | grep samba所需要的文件都有,所以赶紧到/etc/samba/下配置smb.conf文件.在最后的位置加入了信息:

[my]
path = /home/my
read only = no
public = yes
browseable =yes

由于只是建立个简单能共享的目录,不考虑安全和权限问题,保存退出.testparm很正常,然后重新启动samba.建立了1个用户,又用smbpasswd -a 用户名 添加到了smb的用户

切换到windowns机器上用建立的用户访问共享的这个目录发现没有权限访问.

解决办法:vi /etc/sysconfig/selinux这个文件

# 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=enforcing
#SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

相关推荐