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

os.mknod() requires superuser privileges on other platforms #316

Closed
maikthulhu opened this issue Jul 4, 2021 · 1 comment
Closed

os.mknod() requires superuser privileges on other platforms #316

maikthulhu opened this issue Jul 4, 2021 · 1 comment

Comments

@maikthulhu
Copy link

Good morning! I'm running HASS in a FreeBSD jail (using TrueNAS) and ran into a minor issue when performing initial config and getting set up.

The error I received is:
OSError: [Errno 22] Invalid argument

Unfortunately I didn't save the entire stack trace. I referenced process_yaml.py:280 (linked above) which points to os.mknod(path). It appears this call requires superuser privileges which prevents DD from loading. An appropriate user-level call is below. I can do a PR if you like but since it was just one line I figured it would take less time this way.

I replaced line 280 with:
open(path, 'w').close()

This creates the (.installed) file if it doesn't exist and then closes the file handle. Nice and easy, though slightly less clean.

References:
https://stackoverflow.com/questions/32115715/os-mknod-fails-on-macos

@dwainscheeren
Copy link
Owner

Thanks, patched in 2.0.4.

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