Note: How to fix Permission denied problem with tcpdump in ubuntu

When I run tcpdump -w client.cap on ubuntu, I got an error:

tcpdump: ./client.cap: Permission denied;

How to solve this problem:

#grep tcpdump /sys/kernel/security/apparmor/profiles: 

/usr/sbin/tcpdump (enforce)

#aa-complain /usr/sbin/tcpdump

The program 'aa-complain' is currently not installed. You can install it by typing:
apt-get install apparmor-utils

#apt-get install apparmor-utils

After installation successful:

#aa-complain /usr/sbin/tcpdump

Setting /usr/sbin/tcpdump to complain mode.

Then tcpdump -w client.cap can be launched successfully.

posted @ 2016-04-28 11:51  dxh1231  阅读(388)  评论(0编辑  收藏  举报