-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to PWM control without sudo #93
Comments
Code-wise Line 917 in 0ee35ed
You can add You can also |
I don't quite understand what exactly you are talking about. Can you explain more about this please? |
I told you which changes you can do to code to have different permissions. Alternatively, run |
Thanks. I will give a try |
It's better this way, but!!
|
It's also possible to do it via udev (say, in
This has the advantage of being run after manual |
So i tried as you said by changing the source code and compiling again, but it doesn't work. I also tried the udev rule and systemd service, but it still doesn't work. Only manually changing rights solves the problem.
What else can I do?
|
Ok, now it works with I would like it to work as a regular user, but for now I’ll leave it that way. If you have any ideas why S_IWOTH does not work in my case, I would be glad to hear |
Maybe the previous version of the module was not unloaded from memory? but it just has to work |
Nope, i rebooted my PC several times. Still doesn't working |
module loaded via insmod nct6687.ko or ... |
|
I've run out of ideas, well... it could be the machinations of selinux. protects your safety :) |
this is a version issue in version 6* this was certainly limited!
:(:(:( |
Oups, sorry for advising something that can't work: https://github.com/torvalds/linux/blob/67be068d31d423b857ffd8c34dbcc093f8dfff76/fs/sysfs/group.c#L63 Didn't know Linux limits permissions there. One can probably modify group, but using |
I was also looking for how to change the group, for example to whel :) until I learned how |
As i said above, udev rule doesn't work for me as well for some reason |
most likely for the same reason... //access for everyone should be given by root, of course and not automatically need to see how to change the group |
I missed that when catching up. Glob doesn't expand there and of course I tested without it... Try corrected version:
I think this is the API: /**
* sysfs_file_change_owner - change owner of a sysfs file.
* @kobj: object.
* @name: name of the file to change.
* @kuid: new owner's kuid
* @kgid: new owner's kgid
*
* This function looks up the sysfs entry @name under @kobj and changes the
* ownership to @kuid/@kgid.
*
* Returns 0 on success or error code on failure.
*/ |
To begin with, I wanted to start with the fact that everything works fine on the MAG B550 TOMAHAWK MAX WIFI, thanks for this module!
PWM signal control works as expected, but it's a little annoying to use sudo every time. I would like to know if it is possible to control the PWM signal without sudo? I understand that this no longer applies to this driver, but to /sys in general, but I did not find the necessary information. I tried adding a regular user to the root group, but that didn't help. I have no idea how this can be implemented, or whether it is possible at all. I would be grateful for any answer, thanks!
The text was updated successfully, but these errors were encountered: