tcpdump can't open file: permission denied (linux)

Furin asked:

I set all filters for Tcpdump in a config file, but when I run this command:

sudo tcpdump  -i any -w "./mypcap.pcap" -F "myfilters.txt"

I get permission denied although my file has rwx for users, groups, and others. What am I doing wrong?

My answer:


You’re probably in a directory that can’t be written to, such as /proc, or an NFS mounted directory with root_squash. Change to a writable directory and try again, or direct your output file to a writable directory.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.