我的系统是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.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)
有什么问题?
我的服务器是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
?
我的服务器是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
什么区别?
我的系统是带有 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
?
加:
我终于解决了这个问题: …
我在 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/policy
中smtpd_sender_restrictions
,这意味着我证明我是正确使用邮件域来发送邮件。
我认为我postconf
是完美的,但有人说smtpd_sender_restrictions
应该在smtpd_recipient_restrictions
。
SPF 应该添加到 smtpd_sender_restrictions 还是 smtpd_recipient_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) 我的服务器是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
表示只有600
或400
文件权限。(*.php 不需要x
权限)
至于文件夹权限,只有500
或700
。
这应该是最佳实践,因为提供尽可能少的广告许可。
有什么安全问题吗?