I am running a program on kali Linux. The program uses Openssl and some other networking libraries. When I try to run the program I get the output below:
Failed to open /sys/kernel/debug/ieee80211/phy6/ath9k_htc/inject_noack for writing
Failed to open /sys/kernel/debug/ieee80211/phy14/ath9k_htc/inject_noack for writing
Testing ACK generation...
Failed to open /sys/kernel/debug/ieee80211/phy6/ath9k_htc/macaddr for writing
Failed to open /sys/kernel/debug/ieee80211/phy6/ath9k_htc/bssidmask for writing
When I realized this error, I checked and Failed to open /sys/kernel/debug/ieee80211/phy6 folder existed but it was all empty. I tried to run chmod 777 to make the rest usable, even with root privileges.
So these folders are only used for logging the debug info? If so maybe I can comment out in the program where it uses this directory?
Why does /sys/kernel/debug/ieee80211/phy6/ phy1,phy14,phy15,phy16 are empty. And if these folders are for logging debug info, I don't understand why developers tried hard to use a folder which can't even be reached without kernel rights.
And even with root privileges, I can't create a directory under these folders. What is the solution, is it common for programs to use these debug folders which can't even be opened/edited with root?
┌──(root㉿kali)-[/sys/kernel/debug/ieee80211/phy14]
└─# chmod 777 /sys/kernel/debug/ieee80211/phy6/
┌──(root㉿kali)-[/sys/kernel/debug/ieee80211/phy14]
└─# mkdir ath9k_htc
UPDATE:
With chmod I get
┌──(root㉿kali)-[/sys/kernel]
└─# sudo chmod 777 -R debug
chmod: changing permissions of 'debug/tracing': Operation not permitted
kernel version:
┌──(root㉿kali)-[/sys/kernel]
└─# uname -r
6.5.0-kali3-amd64
I get this error when following the installation:
┌──(root㉿kali)-[/home/kali/Desktop]
└─# cd drivers && make defconfig-ath9k-debug
/--------------
| Your kernel headers are incomplete/not installed.
| Please install kernel headers, including a .config
| file or use the KLIB/KLIB_BUILD make variables to
| set the kernel to build against, e.g.
| make KLIB=/lib/modules/3.1.7/
| to compile/install for the installed kernel 3.1.7
| (that isn't currently running.)
\--
make: *** [Makefile:41: defconfig-ath9k-debug] Error 1
/sysare virtual directories and files provided via the kernel (just like the stuff under/proc). Ordinary filesystem permissions may not apply to everything.