在iptables和selinux中放行smb服务
配置selinux
[root@localhost samba]# getsebool -a | grep samba 查找selinux中对samba的限制项
samba_domain_controller --> off
samba_enable_home_dirs --> off
samba_export_all_ro --> off
samba_export_all_rw --> off
samba_share_nfs --> off
use_samba_home_dirs --> off
virt_use_samba --> off
[root@localhost samba]# setsebool -P samba_export_all_rw=1(=0是关闭)
[root@localhost samba]# setsebool -P samba_export_all_ro=1
[root@localhost samba]# getsebool -a | grep samba
samba_domain_controller --> off
samba_enable_home_dirs --> off
samba_export_all_ro --> on(如果只读共享的文件只开此项就行)
samba_export_all_rw --> on(如果读写,只开此项就行,修改文件时要看文件的chmod属性。)
samba_share_nfs --> off
use_samba_home_dirs --> off
virt_use_samba --> off
如不想共享文件可运行如下语句
[root@localhost samba]# setsebool -P samba_export_all_rw=0
[root@localhost samba]# setsebool -P samba_export_all_ro=0
在iptables和selinux中放行smb服务的更多相关文章
- centos中selinux功能及常用服务配置
SELinux: Secure Enhenced Linux 常用命令 获取selinux的当前状态: # getenforce 临时启用或禁用: # setenfoce 0|1 永久性启用,需要修改 ...
- 关闭Linux中的iptables,firewalld,SELINUX
firewalld 停止firewalld服务 [root@VM_0_13_centos var]# systemctl stop firewalld 或 [root@VM_0_13_centos v ...
- iptables与SELinux
iptables: 开始配置我们来配置一个filter表的防火墙.(1)查看本机关于IPTABLES的设置情况 [root@tp ~]# iptables -L Chain INPUT (policy ...
- CentOS 7.0如何安装配置iptables和seLinux以及firewalld
一.配置防火墙,开启80端口.3306端口 CentOS .0默认使用的是firewall作为防火墙,这里改为iptables防火墙. .关闭firewall: systemctl stop fire ...
- smb服务问题解析,区别红帽6和CentOS7
最近在学习smb服务,哇!简直问题多的不要不要的.因为以前是学习的红帽6的系统,现在用的是CentOs7,所以还是改不了以前的一些配置方式,造成了很多问题.快成地中海了! 我们准备环境: 系统: 服务 ...
- centos7搭建smb服务
1 yum install samba samba-client samba-common -y 安装smb服务 2 cp -a /etc/samba/smb.conf /etc/samba/sm ...
- [转载]SELinux 环境下网络服务设置,配置 Apache 、Samba、NFS
原文地址:http://www.ibm.com/developerworks/cn/linux/l-cn-selinux-services1/index.html?ca=drs- 引言 SELinux ...
- ubuntu14.4.4安装smb服务实现文件共享
1.软件安装,ubuntu14需要安装的软件有3个 安装服务前养成习惯 sudo apt-get upgrade 首先切换到超级用户 su - root sudo apt-get install s ...
- CentOS6.5(4)----宿主机无法访问虚拟机中的web服务解决方案
宿主机无法访问虚拟机中的web服务 在Windows7宿主机中的VMware虚拟机中安装了CentOS6.5操作系统,并且基于Nginx搭建了Web服务器,网页刚刚搭建好的时候,通过宿主机的浏览器可以 ...
随机推荐
- Automatically watermark all uploaded photos (给所有上传的相片加水印)
Hello, This mod automatically watermark all uploaded photos. Price: FREE, enjoy. You will have to ed ...
- STM32学习笔记——新建工程模板步骤(向原子哥学习)
1. 在创建工程之前,先在电脑的某个目录下面建立一个文件夹,我们先把它命名为Template,后面建立的工程可以放在这个文件夹下.在 Template 工程目录下面,新建 3 个文件夹USER , ...
- HDU 2553 n皇后问题(回溯法)
DFS Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description ...
- javaWeb中一个按钮提交两个表单
一个按钮提交两个表单,有时候会用到,一般会很容易想到使用 onclick="document.form1.submit();document.form2.submit();" 的方 ...
- keil优化等级设置
附表:Keil C51中的优化级别及优化作用 级别说明 0 常数合并:编译器预先计算结果,尽可能用常数代替表达式.包括运行地址计算. 优化简单访问:编译器优化访问8051系统的内部数据和位地址. 跳转 ...
- C 编译器错误信息中文翻译
Ambiguous operators need parentheses 不 明确的运算需要用括号括起 Ambiguous symbol ``xxx`` 不明确的符号 Argument list sy ...
- ldd显示可执行模块的dependenc
ldd的作用是打印可执行档依赖的共享库文件.它是glibc的一部分,由Roland McGrath和Ulrich Drepper维护:$ ldd --versionldd (GNU libc) 2.9 ...
- Yarn应用程序运行流程剖析
Yarn(Yet Another Resource Negotiator)是一个Hadoop集群资源管理系统,Hadoop2时被引入,旨在提高MapReduce的性能,但YARN已足够通用,使得它可以 ...
- Clone Graph——LeetCode
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's ...
- SVN 服务器IP地址变更后客户端的修改
找到需要更新修改的代码目录: 在右键菜单TortoiseSVN>Relocate……对话框中可以更改svn服务器地址. so easy!