在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服务器,网页刚刚搭建好的时候,通过宿主机的浏览器可以 ...
随机推荐
- day06
一.configparser模块 configparser用于处理特定格式的文件,其本质上是利用open来操作文件 1.获取所有节点 import configparser config = conf ...
- Python3.4+opencv3
1.安装Python 3.4 for Windows 好的这好像没有什么可以说的 2.下载OpenCV 3和Numpy(OpenCV依赖Numpy库) 大家在这里就出了问题.如果使用直接使用pip i ...
- Java中堆内存(heap)和栈内存(stack)的区别
在Java代码中,常常会使用到这样的类的声明实例化: Person per = new Person(); //这其实是包含了两个步骤,声明和实例化 Person per = null; //声明一个 ...
- mapreduce (三) MapReduce实现倒排索引(二)
hadoop api http://hadoop.apache.org/docs/r1.0.4/api/org/apache/hadoop/mapreduce/Reducer.html 改变一下需求: ...
- 解决mongodb ISODate相差8小时问题
服务端使用mongoose操作mongodb,其中Schema中的日期字段定义如下: date: {type:Date, default:Date.now},//操作日期 插入到mongodb中adt ...
- 【HDOJ】2809 God of War
状态DP. /* 2809 */ #include <iostream> #include <queue> #include <cstdio> #include & ...
- 【Linux】鸟哥的Linux私房菜基础学习篇整理(十二)
1. depmod [-Ane]:更新内核模块依赖.参数:无参数:depmod会主动分析目前内核的模块,并重新写入/lib/modules/$(uname -r)/modules.dep中:-A:de ...
- (2015年郑州轻工业学院ACM校赛题) A 彩票
这是个简单的题目,其实就是判断是否是偶数, 对二进行特判一下就行了! 比赛时候我们还错两次................ 一看简单题就想抢一血,谁知到第一次提交CE, 再提交WA 汗........ ...
- 【转】 Ubuntu samba服务器搭建及测试--不错
原文网址:http://blog.csdn.net/longfeey/article/details/5937968 Ubuntu samba服务配置是很不错的文件应用很有学习价值, 这里我主要讲解U ...
- mysql语法充电
1.关键字delimiter 的作用 ①delimiter叫做“定界符” ,经常可以在复合sql语句或者存储过程等语句中看到 DELIMITER $$ 的内容, ②DELIMITER $$的意义是告 ...