Ask Your Question

Revision history [back]

You don't mention the OS, but it's likely that it's Windows. Wireshark, by default. installs into a protected directory, usually "C:\Program Files" and ordinary users cannot write into this directory without privilege elevation and I suspect you are trying to write capture files into this directory.

To fix this, simply change into a directory where you do have write permission, e.g. your "Documents" directory, and run the command there, adding the full path to tshark, e.g.

"C:\Program Files\Wireshark\tshark.exe" ... -w capture1.pcapng.

You could alternatively supply the full path to the capture file, e.g.

tshark ... -w "C:\Users\<your user name>\Documents\capture1.pcapng"