AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-489709

kittygirl's questions

Martin Hope
kittygirl
Asked: 2019-03-16 18:21:59 +0800 CST

centos 7 中的“/var/log/mariadb/mariadb.log”是什么?

  • -1

我的系统是 centos 7 和 mariadb 5.5.60。

####LOG####
log_warnings=1
log-error=/var/log/mariadb-err.log
####slow log####
slow-query-log=1
long_query_time=5
slow-query-log-file=/var/log/mariadb-slow.log

log这就是我的全部内容/etc/my.cnf。

我/var/log/mariadb/mariadb.log在我的服务器中找到,但它是一个空文件。
是什么/var/log/mariadb/mariadb.log?

mysql
  • 1 个回答
  • 4846 Views
Martin Hope
kittygirl
Asked: 2019-03-11 20:00:01 +0800 CST

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

  • 6

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

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

clamav
  • 3 个回答
  • 13660 Views
Martin Hope
kittygirl
Asked: 2019-03-08 20:06:24 +0800 CST

虚拟机格式更改是否会导致 Windows server 2016 许可证无效?

  • 1

我的服务器是centos 7,我Windows server 2016 virtual machine通过KVM创建,这个虚拟机是qcow2格式化的。
我通过许可证激活了这个 Windows 服务器虚拟机,一切正常。

然后我将此qcow2虚拟机转移到另一台服务器,格式更改为VMDK.

此操作是否会导致Windows server 2016停用?

windows
  • 1 个回答
  • 53 Views
Martin Hope
kittygirl
Asked: 2019-03-04 23:33:39 +0800 CST

如何获取 Centos 安全更新通知?

  • 0

我的系统是centos 7.4。

据我所知,RED HAT 有安全更新通知。

我想知道在哪里可以获得 Centos 安全更新通知。

centos
  • 1 个回答
  • 299 Views
Martin Hope
kittygirl
Asked: 2019-03-02 18:01:31 +0800 CST

如何优雅地重启centos 7和mysql?

  • 0

我的系统是 centos 7.4 和 Mariadb 5.5。

我总是跑reboot重启服务器。由于我的数据库是Mariadb MyISAM,我不确定是否reboot会导致数据库不一致,可能会丢失数据,甚至数据库损坏。

有没有一种安全的方法(没有任何数据丢失)来重新启动服务器?

提前致谢!

mysql
  • 1 个回答
  • 1676 Views
Martin Hope
kittygirl
Asked: 2019-02-28 17:38:13 +0800 CST

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

  • 12

我的系统是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.

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

apache-2.4
  • 3 个回答
  • 23985 Views
Martin Hope
kittygirl
Asked: 2019-02-19 19:53:46 +0800 CST

应用 iptables 规则时的未知选项“--syn”

  • 0

我的系统是centos 7,下面是我的iptalbes设置规则:

-A INPUT -m iprange --src-range 72.188.0.0-72.188.255.255 --syn -m conntrack --ctstate NEW -p tcp -m multiport --dports 22,995,3306 -j ACCEPT

此设置仅允许专用 IP 范围访问端口 22,995,3306。

但我得到如下错误:

iptables: Applying firewall rules: iptables-restore v1.4.21: unknown option "--syn"

问题出在哪里?

iptables
  • 1 个回答
  • 904 Views
Martin Hope
kittygirl
Asked: 2019-02-09 18:27:01 +0800 CST

阻塞 25 端口导致邮件服务器无法接收邮件

  • 0

我为我的 postfix 和 dovecot 使用 TLS,并准备通过各种工具测试 centos 7 邮件服务器,结果如下:

Priority: 5 Connection established: yes TLS: yes SSL: yes Cipher: TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384 Uses secure cipher: yes

然后我阻止了端口25,iptables但我不能再收到邮件了。

当我准备使用 TLS 时,这意味着我只使用587或465,为什么阻塞端口25导致我无法接收邮件?

postfix
  • 2 个回答
  • 865 Views
Martin Hope
kittygirl
Asked: 2019-02-08 07:15:08 +0800 CST

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

  • 4

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

我注意到以下警告:

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

我已经入驻debugLevel = 4了/etc/python-policyd-spf/policyd-spf.conf。
如何找到问题所在python-policyd-spf?

加:
我终于解决了这个问题:
在/etc/postfix/main.cf,我改成unix:private/policy ,unix:private/policyd-spf宾果!

smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,check_policy_service unix:private/policyd-spf,reject_invalid_hostname,reject_non_fqdn_helo_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient
postfix
  • 2 个回答
  • 3279 Views
Martin Hope
kittygirl
Asked: 2019-02-08 04:08:39 +0800 CST

当`postconf -n`时警告`未定义参数:mua_sender_restrictions`

  • 3

我的系统是 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 = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 30720000
milter_default_action = accept
milter_protocol = 6
mydestination = $myhostname,localhost.$mydomain,localhost,localhost.localdomain
myhostname = mail.mydomain.com
mynetworks = 127.0.0.1
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = $smtpd_milters
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
show_user_unknown_table_name = no
smtp_tls_security_level = may
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_non_fqdn_helo_hostname,reject_invalid_helo_hostname,reject_unknown_helo_hostname
smtpd_milters = inet:127.0.0.1:8891
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,check_policy_service unix:private/policy-spf,reject_invalid_hostname,reject_non_fqdn_helo_hostname,reject_non_fqdn_sender,reject_non_fqdn_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_non_fqdn_sender,reject_unknown_sender_domain,reject_rbl_client zen.spamhaus.org
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/pki/dovecot/certs/fullchain.cer
smtpd_tls_key_file = /etc/pki/dovecot/private/*.mydomain.com.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:1000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit = 209715200
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:1000
postconf: warning: /etc/postfix/main.cf: unused parameter: policy_time_limit=3600s
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message=Sorry, the maildir has overdrawn diskspace quota
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: policy-spf_time_limit=3600

我注意到一些警告:

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

postconf: warning: /etc/postfix/main.cf: unused parameter: policy_time_limit=3600s
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message=Sorry, the maildir has overdrawn diskspace quota
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: policy-spf_time_limit=3600

的有效部分/etc/postfix/master.cf是:

smtp      inet  n       -       n       -       -       smtpd
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=$mua_client_restrictions
  -o smtpd_helo_restrictions=$mua_helo_restrictions
  -o smtpd_sender_restrictions=$mua_sender_restrictions
 -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       n       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_client_restrictions=$mua_client_restrictions
  -o smtpd_helo_restrictions=$mua_helo_restrictions
  -o smtpd_sender_restrictions=$mua_sender_restrictions
  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       n       -       -       qmqpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}
policyd-spf  unix  -       n       n       -       0       spawn
  user=nobody argv=/usr/libexec/postfix/policyd-spf

这些警告的可能原因是什么?如何解决?

postfix
  • 4 个回答
  • 12859 Views
Martin Hope
kittygirl
Asked: 2019-01-30 15:41:32 +0800 CST

SSH 登录没有家庭目录的用户时是否存在任何安全问题?

  • 0

我的系统是centos 7。
我的目的是增强服务器安全性,只让sshuser登录然后su root。

我创建了一个仅用于 SSH 登录的用户useradd -M -u 888 sshuser。
我也AllowUsers sshuer入了/etc/ssh/sshd_config。

然后sshuser登录时会收到如下提示:

Could not chdir to home directory /home/sshuser: No such file or directory
-bash-4.2$ su root
Password:

SSH 登录没有家庭目录的用户时是否存在任何安全问题?

linux
  • 1 个回答
  • 81 Views
Martin Hope
kittygirl
Asked: 2019-01-25 18:54:16 +0800 CST

如何在centos 7中创建一个真正没有组的用户?

  • 1

根据这个问题,我决定创建虚拟用户作为网站文件的所有者。

Centos 7 在我运行时提供默认组 ID 100 useradd -u 508 -M -N -s /sbin/nologin dummyuser1。
我想为 提供尽可能少的特权dummyuser1,然后我不希望dummyuser1有组。

怎么做?

centos
  • 1 个回答
  • 119 Views
Martin Hope
kittygirl
Asked: 2019-01-25 00:02:39 +0800 CST

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

  • 0
这个问题在这里已经有了答案:
我的网站文件/文件夹在 Linux 网络服务器上应具有哪些权限? (6 个回答)
3年前关闭。

我的服务器是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。

这应该是最佳做法,因为尽可能少地提供许可。
有什么安全问题吗?

php
  • 1 个回答
  • 89 Views
Martin Hope
kittygirl
Asked: 2019-01-23 18:33:40 +0800 CST

如何仅更新 Centos 7 以增强安全性并最大程度地减少代码修改?

  • 0

基于这篇文章,

对于 CentOS,您必须应用所有更新或不应用,没有办法只选择安全更新。

然后,唯一的方法是yum update如果我想减少安全问题。

centos 7系统更新后如何知道我的PHP、javascript代码是否需要修改?

centos
  • 2 个回答
  • 189 Views
Martin Hope
kittygirl
Asked: 2018-11-01 18:24:59 +0800 CST

centos 7维护期间如何允许root登录服务器和禁止网站用户连接?

  • 1

我的 clound VPS 服务器是,centos 7.4我在这台服务器上运行。现在,我想从迁移到. 在维护期间,服务器需要. 在centos 7中,没有,然后我阅读了这篇文章并尝试了,结果是我无法再登录我的服务器了。 我想即使我是根用户也要关闭任何连接。 那么,在维护期间,如何允许root登录服务器和禁止网站用户连接?apachemariadbmariadbmysql
no user disturb
run level 1systemctl rescue
systemctl rescue

maintenance
  • 1 个回答
  • 37 Views
Martin Hope
kittygirl
Asked: 2018-10-29 23:49:47 +0800 CST

postfix的master.cf中的`dovecot-lda`和`deliver`有什么区别?

  • 0

在master.cf后缀之后dovecot unix - n n - - pipe,
我总是添加:

  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient} 

然后我可以通过我的虚拟邮件地址接收电子邮件。
但是有人说应该使用deliver而不是dovecot-lda如下:

flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

我的服务器是centos 7,虚拟邮件地址存储在Mariadb 5.5中。
两者deliver和dovecot-lda都可以在 中找到/usr/libexec/dovecot。我可以使用这两种设置发送和接收邮件。
我应该使用哪一个?

postfix
  • 1 个回答
  • 1238 Views
Martin Hope
kittygirl
Asked: 2018-10-24 05:01:38 +0800 CST

应该将 SPF 添加到 smtpd_sender_restrictions 还是 smtpd_recipient_restrictions?

  • 3

我在 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'  

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

postfix
  • 1 个回答
  • 672 Views
Martin Hope
kittygirl
Asked: 2018-10-13 05:36:30 +0800 CST

我可以在 fail2ban 日志路径中使用正则表达式吗?

  • 4

我正在使用CETNOS 7, yum install fail2ban,in /etc/fail2ban/jail.local,我想设置:

[DEFAULT]
apache_error_log = /var/log/httpd/*error_log
/home/websites/.*?/log/errorlog  

表达:

    [DEFAULT]
    apache_error_log = /var/log/httpd/*error_log
    /home/websites/site1/log/errorlog
    /home/websites/site2/log/errorlog  

然后,我可以使用%(apache_error_log)s如下/etc/fail2ban/jail.local:

[apache-noscript]

port     = http,https
logpath  = %(apache_error_log)s

这个可以吗?

fail2ban
  • 1 个回答
  • 1371 Views
Martin Hope
kittygirl
Asked: 2018-10-01 18:17:50 +0800 CST

必须将不同的文件所有者设置为不同的 apache vhost?

  • 0

我有vhost1,vhost2在 Apache 下。
我是否需要将/var/www/vhost1文件所有者设置为vhostuser1,将 /var/www/vhost2文件所有者设置为vhostuser2.
有人说这是安全的必要设置,假设vhost1被黑客入侵,vhost2不会受到影响。

apache-2.2
  • 2 个回答
  • 89 Views
Martin Hope
kittygirl
Asked: 2018-09-28 17:17:52 +0800 CST

Centos7中的shutdown -h和shutdown有什么区别?

  • -2

shutdown -h nowvs shutdown now,Centos 7有什么区别?

centos7
  • 1 个回答
  • 1419 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve