Skip to content
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

Permission error when viewing logs on macOS #27

Open
jussapaavo opened this issue Jul 27, 2024 · 1 comment
Open

Permission error when viewing logs on macOS #27

jussapaavo opened this issue Jul 27, 2024 · 1 comment

Comments

@jussapaavo
Copy link

jussapaavo commented Jul 27, 2024

When trying to read the logs, I get Unable to read the file. The log files are in the correct location and can be seen with Finder, but they cannot be opened with any application. After inspecting, it seems like the log files are created without read permissions for the current user.
To fix this locally, I need to run chown myusername /private/tmp/kanata_lastrun_3545806179.log for each of the log files.

Is this because I run the kanata-tray service as sudo? I'm trying to research if I can fix this locally, but also wanted to report this if this is something that can be fixed in the source code instead.

Here's what ls gives:

.rw------- root wheel 19 KB 2024-07-27 11:32:45 AM /private/tmp/kanata_lastrun_1569220938.log
@rszyma
Copy link
Owner

rszyma commented Jul 27, 2024

Is this because I run the kanata-tray service as sudo

Yes. It's also a bit unfortunate that kanata need to run as superuser in macos, and there's no way around it. It's one of "security features" of macos. Log files being readable only by superuser make sense in that security framework, because if you (accidentally) enable --debug flag in kanata, you're basically keylogging yourself, but it's at least only readable to superuser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants