Search code examples
macospermissionswireshark

Wireshark - you don't have permission to capture on that device mac


I installed Wireshark and during the installation it showed an error but the installation itself completed. When I ran the program and tried to capture packets on my network, it showed this error:

You don't have permission to capture on that device

I'm new to mac so i don't even know how to properly ask.

Could someone help me?


Solution

  • According to User: gmale's answer on ask.wireshark.org, he solved his problem in this way and I'm sure that it could solve yours as well. It says:

    1- Open Terminal

    2- Type 'whoami' or Copy and paste this command To see your exact user name:

    whoami
    

    (for me that was AliGht)

    enter image description here

    3- Now execute the following commands:

    cd /dev
    

    And grant your username admin access:

    sudo chown YourComputerUsername:admin bp*
    

    and enter your computer password, if it is your first time, then it is normal in Unix command line or cmd to not see the passwords you type in the cmd, due to the security of your computer:

    enter image description here

    4- now type this command for to find bp:

    ls -la | grep bp
    

    The last command will display a list of files such as:

    enter image description here

    5- Make sure all of them have your user name and admin as the user/group. For some reason, the last one didn't get assigned properly so I had to run the command:

    sudo chown YourComputerUsername:admin bpf4
    

    so the last command fixed my problem as you see in the last image:

    enter image description here

    Done!

    If your WireShark is open then close it and open it again.

    All credits of this tutorial goes to user gmale on ask.wireshark.org,

    If you want to open WireShark always as administrator then take a look to another post which I created a shortcut for it via Applescript, and this is the only way which you can open the WireShark always as administrator even when you turn off/on your mac.