小编kit*_*irl的帖子

如何在centos 7中“优雅地重启Apache”?

我的系统是centos 7.4,apache 2.4
基于apache手册apachectl -k graceful应该是正常重启apache的方法,但我收到如下通知:

[root@localhost root]# apachectl -k graceful
Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
If you want to pass extra arguments to httpd, edit the
/etc/sysconfig/httpd config file.
Run Code Online (Sandbox Code Playgroud)

有什么问题?
如何Graceful Restart Apache在centos 7?

apache-2.4 centos7

10
推荐指数
2
解决办法
2万
查看次数

每次重新启动 Apache 时,“未注册的 unix-process 身份验证代理”?

我的服务器是带有 Apache 2.4.6 的 centos 7.4。
每次 I 时systemctl restart httpd,2 条消息都会添加到/var/log/secure.Looks 中:

Jan 19 8:23:48 localhost polkitd[493]: Registered Authentication Agent for unix-process:5739:174943 (system bus name :1.119 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Jan 19 8:23:49 localhost polkitd[493]: Unregistered Authentication Agent for unix-process:5739:174943 (system bus name :1.119, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Run Code Online (Sandbox Code Playgroud)

有什么问题?

apache-2.4 centos7

5
推荐指数
1
解决办法
7万
查看次数

如何让`clamdscan`排除文件夹并只记录`--infected`?

我的服务器是centos 7.4,clamav 0.101.1-1.el7。
当我运行clamscan -r --infected --exclude-dir="^/sys" /终端时,我总是等待 6 个多小时才能获得输出。
如果我关闭终端,clamscan就会停止。

然后我想用来clamdscan在后台扫描。
我的问题是:
1.How to --exclude-dir="^/sys" /with clamdscan
2.如何clamdscan只做日志--infected

clamav

5
推荐指数
1
解决办法
8540
查看次数

`auditctl`中的auid、uid、euid、suid、fsuid、obj_uid、gid、egid、sgid、fsgid、obj_gid有什么区别?

我的服务器是centos7.6,auditd 2.8.5

在审计规则中,我设置了:
-a always,exit -F arch=b32 -S adjtimex,settimeofday -F key=time-change
但是这个规则也记录了正常的ntpd活动,然后我试着把这个规则修改为:

-a always,exit -F arch=b32 -S adjtimex,settimeofday,stime -F subj_type!=ntpd_t  -F auid!=chrony -F auid!=ntp -F auid!=chrony -F auid!=ntp -F key=time-change
Run Code Online (Sandbox Code Playgroud)

应该使用auid!=ntp还是uid!=ntp? 我检查了手册

每个域间方程以及以 -F 开头的方程相互关联以触发审核记录。支持 2 个运算符 - 相等和不相等。有效字段为:auid、uid、euid、suid、fsuid、obj_uid、gid、egid、sgid、fsgid、obj_gid

我很困惑,auid, uid, euid, suid, fsuid, obj_uid, gid, egid, sgid, fsgid, obj_gid in 有auditctl什么区别?

audit auditd centos7

5
推荐指数
1
解决办法
4153
查看次数

`connect to private/policy-spf: No such file or directory` 在 centos 7 中通过 postfix 接收邮件时

我的系统是带有 postfix、dovecot、pypolicyd-spf、opendkim 的 centos 7。
可以发邮件但是收不到邮件

我注意到警告如下:

Feb  6 20:01:09 srv-8327 postfix/smtpd[20391]: warning: connect to private/policy-spf: No such file or directory
Feb  6 20:01:09 srv-8327 postfix/smtpd[20391]: warning: problem talking to server private/policy-spf: No such file or directory
Feb  6 20:01:10 srv-8327 postfix/smtpd[20391]: warning: connect to private/policy-spf: No such file or directory
Feb  6 20:01:10 srv-8327 postfix/smtpd[20391]: warning: problem talking to server private/policy-spf: No such file or directory
Run Code Online (Sandbox Code Playgroud)

我已经设置debugLevel = 4/etc/python-policyd-spf/policyd-spf.conf
如何找到问题python-policyd-spf

加:
我终于解决了这个问题: …

email-server postfix spf centos7

4
推荐指数
1
解决办法
2382
查看次数

SPF 应该添加到 smtpd_sender_restrictions 还是 smtpd_recipient_restrictions?

我在 centos 7 中使用 postfix+dovecot。
我使用

postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,reject_invalid_hostname,reject_non_fqdn_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient'
postconf -e 'smtpd_sender_restrictions =reject_non_fqdn_sender,reject_unknown_sender_domain,reject_rbl_client sbl-xbl.spamhaus.org,check_policy_service unix:private/policy'
postconf -e 'policy_time_limit = 3600s'
postconf -e 'policy-spf_time_limit = 3600'  
Run Code Online (Sandbox Code Playgroud)

设置后缀 main.cf。
公告check_policy_service unix:private/policysmtpd_sender_restrictions,这意味着我证明我是正确使用邮件域来发送邮件。
我认为我postconf是完美的,但有人说smtpd_sender_restrictions应该在smtpd_recipient_restrictions
SPF 应该添加到 smtpd_sender_restrictions 还是 smtpd_recipient_restrictions?

postfix

3
推荐指数
1
解决办法
412
查看次数

`postconf -n` 时警告 `undefined parameter: mua_sender_restrictions`

我的系统是centos 7。我正在根据这篇文章设置带有postfix、dovecot、mariadb的邮件服务器。
我的邮件服务器有问题,可以发送邮件但无法接收邮件

然后我postconf -n,结果如下:

[root@server6328 log]# postconf -n
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/main.cf: undefined parameter: virtual_mailbox_limit_maps
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = …
Run Code Online (Sandbox Code Playgroud)

postfix dovecot

3
推荐指数
2
解决办法
9815
查看次数

当我将 `apache` 设置为网站文件和文件夹的唯一所有者时,是否存在任何安全问题?

我的服务器是centos 7, php 5.4, apache 2.4。我的网站位于/var/www.

至于apache唯一一个用户读或写/var/www,我将所有文件和文件夹的所有者和组设置为apache

对于文件夹和文件只读:-r------- 1 apache apache 922 Jun 3 2014 connect.php
对于需要写入的文件:-rw------- 1 apache apache 922 Jun 3 2014 connect.php
表示只有600400文件权限。(*.php 不需要x权限)
至于文件夹权限,只有500700

这应该是最佳实践,因为提供尽可能少的广告许可。
有什么安全问题吗?

php http https apache-2.4

0
推荐指数
1
解决办法
64
查看次数

标签 统计

centos7 ×4

apache-2.4 ×3

postfix ×3

audit ×1

auditd ×1

clamav ×1

dovecot ×1

email-server ×1

http ×1

https ×1

php ×1

spf ×1