Articles of centos7

CENTOS 7无法编辑共享Windows文件夹中的文件

我有以下非常奇怪的问题: 我们有一个Windows服务器2012 R2服务器上有一些共享。 我试图让他们通过SMB3分享在最低限度。 我们的Windows或Ubuntu客户端没有问题。 然而CentOS 7的客户却是一个麻烦事。 我强迫Windows Server 2012 R2只使用SMB2和3: Set-SmbServerConfiguration -EnableSMB1Protocol $false 而我试图让客户端只使用SMB3,在[global]下的Client Max Protocol = SMB3 in /etc/samba/smb.conf增加一行: Client Max Protocol = SMB3 in /etc/samba/smb.conf 我现在可以访问股票。 用户可以创build,更改和删除文件夹。 他们也可以创build和删除文件。 但是之后他们不能改变他们,任何其他用户都不能访问这个共享。 Could not save the file "smb://winbox/share" Unexpected error: Invalid argument 使用: Get-SmbSession | Select-Object -Property * Get-SmbSession | Select-Object -Property *我可以看到他们使用SMB3连接到服务器。 有没有人有一个想法如何解决这个问题? 如果我强迫我们的用户创build一个FStab文件并使用vers […]

桌面显示locking在访问Centos 7计算引擎的VNC客户端上

我有一个centos 7计算引擎。 它已经安装了vncserver 。 我已经启动vncserver :1并且可以检查它正在运行: $ vncserver -list TigerVNC server sessions: X DISPLAY # PROCESS ID :1 26094 我可以检查本地主机: $ nc localhost 5901 RFB 003.008 $ nc localhost 22 SSH-2.0-OpenSSH_6.6.1 我正在使用Windows7 PC连接TigerVNC客户端版本6.0.1的Windows-64位 当我运行它时,它会提示input密码 。 它接受这个和我看到的日志: Fri Nov 25 16:29:54 2016 vncext: VNC extension running! vncext: Listening for VNC connections on all interface(s), port 5901 […]

没有写夸大的写configuration文件/ CentOS 7的文件

configuration: 猫/ etc / redhat-release CentOS Linux release 7.2.1511 (Core) sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: disabled Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28 ls -ld / etc / quagga drwxrwxrwx. 2 quagga […]

在centos7上进行路由设置

我是新来的路由,但需要完成以下路由任务 我有3台机器A,B,C,CentOS7在他们每个人,selinux禁用,防火墙没有安装 机器A有3个, 连接到互联网IP 147.xx67 / 21(接口eno16777736) 连接到192.168.0.0/24(IP 192.168.0.3)(接口eno50332208) 连接到10.0.0.0/24(IP 10.0.0.3)(接口eno33554984) 机器B有1 nic 连接到192.168.0.0/24(IP 192.168.0.20) 机器C有1 nic 连接到10.0.0.0/24(IP 10.0.0.20) 我需要实现的是,使用CentOS7,将机器A上的路由设置为 1 – 共享互联网的所有现有机器和其他任何我可能连接。 2 – 设置IP转发,使所有机器都可以互相访问。 我确实尝试了以下内容: 在路由器机器上打开包转发: echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf 并设置一些路由规则 #nmcli connection modify "eno33554984" +ipv4.routes "10.0.0.0/24 147.xx67" #nmcli connection modify "eno50332208" +ipv4.routes "192.168.0.0/24 147.xx67" #nmcli connection modify "eno33554984" +ipv4.routes "10.0.0.0/24 192.168.0.3" #nmcli […]

使用Centos防火墙如何分配多个IP到一个端口?

设置一个新的区域,使用限制访问IP地址的端口 。 如何将其应用于多个IP? $ firewall-cmd –new-zone=special $ firewall-cmd –permanent –zone=special –add-rich-rule=' rule family="ipv4" source address=”123.1.1.1" port protocol="tcp" port="10050" accept' 源地址是否允许CSV数组? 它是这样定义的吗? 源地址=“123.1.1.1”,“234.1.1.1”

CentOs 7和SELInux:用户不能写在Apache的Webroot中

我的用户不能添加,修改或删除没有sudo的Apache / PHP文件。 我的环境是: CentOS Linux版本7.2.1511 SELinux状态:启用 当前模式:执行 Apache 2.4.23 我的用户已经在Apache的组: $ id uid=1000(lmeza) gid=1000(lmeza) groups=1000(lmeza),10(wheel),48(apache) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 Apache的Webroot已经有了标签httpd_sys_content_t $ ls -Z /var/www drwxr-xr-x. root root system_u:object_r:httpd_sys_script_exec_t:s0 cgi-bin drwxr-sr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 html 我有一个标签为httpd_sys_rw_content_t的目录,但我不能写在他身上: $ ls -lahZ /var/www/html drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 modules $ touch /var/www/html/modules/abc.txt touch: cannot touch '/var/www/html/modules/abc.txt': Permission denied 正确获取文件访问控制列表: $ getfacl /var/www/html […]

Chrony时间同步在巨大的时间差异

你好目前我有一个本地ntp服务器(慢性)和ntp客户端(慢性),都工作,但是当我试图改变ntp服务器时间说从当前时间减6年。 ntp客户端无法同步它,它只会在syslog上说: 1月9日17:29:11本地主机chronyd [9192]:系统时钟错误6780812.328260秒,开始调整 ntp客户端(chrony)/etc/chrony.conf是默认的configuration,除了服务器指向我的本地NTP服务器(慢性)。 这是我的configuration # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst server local.ntp.server iburst # Ignore stratum in source selection. stratumweight 0 # Record the rate at which the system clock gains/losses time. […]

将辅助IP添加到EC2

我有两个服务器和两个EIP,我已经完成了一个到另一个的迁移,现在想让其中一个EC2pipe理两个EIP,直到我升级为止。 我已按照说明添加它,并将其显示在控制台中,但是使用netstat -i时没有出现额外的networking接口,并且当我将EIP分配给专用IP时,服务器不响应。 我添加了额外的路由,规则和configuration,但是当我尝试重新启动networking服务时,它失败,说明eth1似乎不存在。 一旦我添加额外的私人IP到networking接口应该显示与netstat -i ? 我正在为我想要达到的目标做正确的事情吗?

VirtualHost失败,有多个接口

我有多个接口的实例,我试图configuration基于IP的虚拟主机服务于多个网站,但由于某种原因,它只是返回主文档的根。 我遵循这个教程来获得多个接口的工作。 什么是错的:网站应该显示/var/www/mydomain/index.html ,而是显示/var/www/html/index.html 。 我曾经尝试过:在VirtualHost中使用*:80,但是目标是让不同的IP /接口有多个VirtualHosts。 从VirtualHost移除端口:不做任何事情。 将Listen 80更改为Listen 92.168.1.231:80 ,失败, Cannot assign requested address: AH00072: make_sock: could not bind to address 92.168.1.231:80 。 这是令人担忧的,我还没有find任何解释发生了什么。 没有别的听港口,如果我只听全部80端口,它工作正常。 我的configuration信息: / sbin目录/使用ifconfig eth0:flags = 4163 mtu 1500 inet 192.168.1.231 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80 :: f816:3eff:fee7:b528 prefixlen 64 scopeid 0x20 以太网:16:3e:e7:b5:28 txqueuelen 1000(以太网) RX包8812字节6501811(6.2 MiB) RX错误0丢弃0超限0帧0 […]

Apache虚拟主机优先

在为我的主网​​站创build特定的虚拟主机之前 login到主IP地址打开了Apache默认的欢迎页面 但创build此虚拟主机后,domain.com工作正常,但IP地址打开的domain.com相同的内容 # /etc/httpd/conf.d/domain.com.conf <VirtualHost *:80> ServerName www.domain.com ServerAlias domain.com DocumentRoot /var/www/domian.com/public_html ErrorLog /var/www/domian.com/error.log CustomLog /var/www/domian.com/requests.log combined </VirtualHost> 我不想更改apache欢迎页面 更新 我把这个代码放在我的网站虚拟主机的内容之前来解决问题 <VirtualHost _default_:80> DocumentRoot /var/www/html </VirtualHost>