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 denied: '/llmvision' #162

Open
sshaikh opened this issue Jan 5, 2025 · 7 comments
Open

Permission denied: '/llmvision' #162

sshaikh opened this issue Jan 5, 2025 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@sshaikh
Copy link

sshaikh commented Jan 5, 2025

Bug Description

llmvision fails to start with the above exception in the logs

Version: 1.3.6

Logs

Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 16:04:53 (1 occurrences)
Last logged: 16:04:53

Error setting up entry LLM Vision Events for llmvision
Traceback (most recent call last):
  File "/home/homeassistant/homeassistant/lib/python3.13/site-packages/homeassistant/config_entries.py", line 640, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/atal/homeassistant-config/homeassistant/custom_components/llmvision/__init__.py", line 118, in async_setup_entry
    await hass.loop.run_in_executor(None, partial(os.makedirs, "/llmvision", exist_ok=True))
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "<frozen os>", line 227, in makedirs
PermissionError: [Errno 13] Permission denied: '/llmvision'
@sshaikh sshaikh added the bug Something isn't working label Jan 5, 2025
@sshaikh
Copy link
Author

sshaikh commented Jan 5, 2025

Creating the folder manually fixes this, not sure if this still requires tracking.

@valentinfrlch
Copy link
Owner

Thanks for reporting this! Yes, ideally this should be handled gracefully. Do you have any special permission set? How did you install Home Assistant?

@sshaikh
Copy link
Author

sshaikh commented Jan 5, 2025

I think they call it "home assistant core" ie directly on to Debian (via a venv). HA itself is run via a service user (ie not root) so it makes sense such a directory wouldn't be available.

@valentinfrlch
Copy link
Owner

I see. Makes sense then that folder permissions could be a problem. The problem is likely that /llmvision will actually try to create a top level folder in your case instead of the /homeassistant/llmvision that it's supposed to create. Maybe ./llmvision would work.

@sshaikh
Copy link
Author

sshaikh commented Jan 5, 2025

I'm no expert, but presumably HA itself has a reference to its working directory?

@etnoy
Copy link

etnoy commented Jan 5, 2025

I had the same issue and had to create this folder in the system root. Not ideal

valentinfrlch added a commit that referenced this issue Jan 6, 2025
@valentinfrlch
Copy link
Owner

valentinfrlch commented Jan 6, 2025

I'm no expert, but presumably HA itself has a reference to its working directory?

Indeed it does. Issue should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants