linux smb文件没有,CentOS中samba提示说无标号文件 /software

今天重新做samba实验的时候,本来想设置 /software 为Linux和Windows的共享文件夹,并且让 /software 映射到Windows,实现Linux和Windows的共享

# chcon -t samba_share_t /software

chcon: can't apply partial context to unlabeled file /software

结果实验快成功时,遇到一个这样的问题:提示说无标号文件 /software,结果郁闷了半天,把所有防火前都关了,又把实验重新做了一遍,还是不行。

网上找了半天资料,后面发现问题就出在 selinux 防火墙上,关了也不行啊,立即开启,重新开机,一切OK!!

修改/etc/selinu/config 文件:

[root@master ~]# cat /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=enforcing

# SELINUXTYPE= type of policy in use. Possible values are:

#       targeted - Only targeted network daemons are protected.

#       strict - Full SELinux protection.

SELINUXTYPE=targeted

然后reboot重启机器后,就好了。0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值