Debian Buster: “tcpdump -w file” works only in some directories

烂漫一生 提交于 2021-01-29 10:00:39

问题


The following command (called as user root with and without -i eno)

tcpdump -w a.dump -i eno1 portrange 27900-27901

works only in some directories, eg. /tmp and /root. But it works not in other directories, for example not in /temp created with:

mkdir /temp
chown root.root /temp
chmod 700 /temp

Stopped apparmor, but it doesn't help.

Any ideas to enable other directories?


回答1:


Problem solved. It was AppArmor. I learned the stopping the service does not stop the protection. In detail, there were some rules that don't allow the file extension .dump in unknown directories. The file extension .pcap is allowed in all places. Now I have disabled the control of tcpdump.

I see no reason to forbid *.dump, but to allow *.pcap. Who thinks up such rules?



来源:https://stackoverflow.com/questions/58900788/debian-buster-tcpdump-w-file-works-only-in-some-directories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!