荣耀之链论坛

 找回密码
 立即注册
搜索
查看: 631|回复: 0

dnsmasq启用日志以后selinux就禁止它启动

[复制链接]

1326

主题

2373

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
10267
发表于 2022-9-8 11:04 | 显示全部楼层 |阅读模式
https://bugzilla.redhat.com/show_bug.cgi?id=1663692
这个地址里面提到的现象就是我遇到的

帖子里面给的解决方案是
先用root手动创建好日志文件
.............


Dnsmasq is denied right to override unix permissions in /var/log directory. It can work, just /var/log/dnsmasq.log has to be created first with right to write to it. Daemon running network services runs under dnsmasq user, which has no right to write into /var/log.

If you first create file writeable by that user, dnsmasq should be able to write there.

Can you try (as root):
touch /var/log/dnsmasq.log
chgrp dnsmasq /var/log/dnsmasq.log
chmod g+w /var/log/dnsmasq.log
systemctl restart dnsmasq

This should work also with selinux set to enforcing.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

荣耀之链

GMT+8, 2025-6-18 05:02 , Processed in 0.016617 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表