<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF Sniffer Linux Lock File Permissions Problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80599/nrf-sniffer-linux-lock-file-permissions-problem</link><description>I have successfully setup my nRF51822 chip with Wireshark to capture BLE packets, using the 4.0.0 release of the nRF Sniffer software (extcap folder). However, the capture interface only shows up on Wireshark when I run Wireshark as root. 
 One issue</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2024 11:37:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80599/nrf-sniffer-linux-lock-file-permissions-problem" /><item><title>RE: nRF Sniffer Linux Lock File Permissions Problem</title><link>https://devzone.nordicsemi.com/thread/515452?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 11:37:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cd23e91-0d5b-44c7-b18d-78f7566d1100</guid><dc:creator>Positron</dc:creator><description>&lt;p&gt;Thanks, that&amp;#39;s very insightful!&lt;/p&gt;
&lt;p&gt;On my Linux Mint I have no problem creating files in /var/lock, but the lockfile never gets removed by sniffer code, so it refuses to start a new capture (unless you restart wireshark).&amp;nbsp;Your suggestion helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Sniffer Linux Lock File Permissions Problem</title><link>https://devzone.nordicsemi.com/thread/413672?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 00:02:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8441fc56-8dbb-42f2-8a0e-493d37824f99</guid><dc:creator>coppice</dc:creator><description>&lt;p&gt;This thread is old, but I downloaded the sniffer software today, and the problem is still there. The code in Lockfile.py won&amp;#39;t work on most modern Linux systems. I am use Fedora 37.&lt;/p&gt;
&lt;p&gt;The code tries to use traditional lock files in /var/lock for the serial port, but messes them up. Root status is needed on modern Linux machines to create and write files in /var/lock (or /run/lock, depending on the system). So, they put the lock files for things like serial ports in a subdirectory called /var/lock/lockdev, which anyone can write to. I changed Lockfile.py to use /var/lock/lockdev , but it still gets things wrong. It never removes the locks it has created, even when you run the software as root. For the moment I have disabled the locking and unlocking code, by simply changing the tests in Filelock.py to look for the system be an &amp;quot;xlinux&amp;quot; one, instead of a &amp;quot;linux&amp;quot; one. Now I can capture OK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Sniffer Linux Lock File Permissions Problem</title><link>https://devzone.nordicsemi.com/thread/334234?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 17:35:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f5785c6-0446-4128-875e-406863d760ee</guid><dc:creator>glassthumb</dc:creator><description>&lt;p&gt;Thanks for the reply. I just confirmed that the lock file doesn&amp;#39;t exist, but it seems to be related to permissions on the /var/lock (symlinked to /run/lock) directory. Changing the permissions on that directory does seem to fix the problem, so appreciate the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Sniffer Linux Lock File Permissions Problem</title><link>https://devzone.nordicsemi.com/thread/334050?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 07:57:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23c3ce90-cdc5-4232-b738-eb3343d47f52</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""](&lt;span style="font-family:courier new, courier;"&gt;PermissionError: [Errno 13] Permission denied: &amp;#39;/var/lock/LCK..ttyUSB0&amp;#39;&lt;/span&gt;).[/quote]
&lt;p&gt;I think this is a stale lock file from a previous (root) session. Have you tried deleting it, and see if this then helps the scenario?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Sniffer Linux Lock File Permissions Problem</title><link>https://devzone.nordicsemi.com/thread/333986?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 14:55:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc0df5cb-77ad-4419-9405-c9a80e9c7cbd</guid><dc:creator>glassthumb</dc:creator><description>&lt;p&gt;Initially this was an issue, but I installed nrf-udev which changes the permissions on the serial port when plugged in. Now it seems to be related to the lock file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Sniffer Linux Lock File Permissions Problem</title><link>https://devzone.nordicsemi.com/thread/333838?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 07:40:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a5e83a6-6382-4cbe-b719-447bbec62deb</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could this be the reason for the user permission issue?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://askubuntu.com/questions/133235/how-do-i-allow-non-root-access-to-ttyusb0"&gt;https://askubuntu.com/questions/133235/how-do-i-allow-non-root-access-to-ttyusb0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>