hassio-addons: [Mealie] PermissionError: [Errno 13] Permission denied: '/config/addons_config/mealie_data/.secret'
Description
When trying to start mealie, I’m now getting this error. The last confirmed version that works for me is v1.0.0-RC. I started experiencing this issue today when I updated to v1.0.0.5. If I downgrade to v1.0.0, I get a different error where it repeats the following line:
Switching to dedicated user
usermod: no changes
On v1.0.0, if i change my uid/gid from 0 to 1000, I get the same error as I do on v1.0.0.5 and above. The full traceback is below:
User uid: 1000
User gid: 1000
Traceback (most recent call last):
File "/app/mealie/db/init_db.py", line 10, in <module>
from mealie.core import root_logger
File "/app/mealie/core/root_logger.py", line 60, in <module>
logger_config = get_logger_config()
File "/app/mealie/core/root_logger.py", line 28, in get_logger_config
settings = get_app_settings()
File "/app/mealie/core/config.py", line 40, in get_app_settings
return app_settings_constructor(env_file=ENV, production=PRODUCTION, data_dir=determine_data_dir())
File "/app/mealie/core/settings/settings.py", line 190, in app_settings_constructor
**{"SECRET": determine_secrets(data_dir, production)},
File "/app/mealie/core/settings/settings.py", line 16, in determine_secrets
if secrets_file.is_file():
File "/usr/local/lib/python3.10/pathlib.py", line 1322, in is_file
return S_ISREG(self.stat().st_mode)
File "/usr/local/lib/python3.10/pathlib.py", line 1097, in stat
return self._accessor.stat(self, follow_symlinks=follow_symlinks)
PermissionError: [Errno 13] Permission denied: '/config/addons_config/mealie_data/.secret'
Reproduction steps
bash
- Update to v1.0.0 or above
- Make sure UID/GID is not 0
- Start the add-on
- Error appears
Addon Logs
/etc/cont-init.d/00-banner.sh: executing
-----------------------------------------------------------
Add-on: Mealie (Omni):
Mealie is a self hosted recipe manager and meal planner built in Vue
-----------------------------------------------------------
Add-on version: v1.0.0
There is an update available for this add-on!
Latest add-on version: v1.0.0-7
Please consider upgrading as soon as possible.
System: Home Assistant OS 11.4 (amd64 / qemux86-64)
Home Assistant Core: 2024.1.5
Home Assistant Supervisor: 2023.12.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums
-----------------------------------------------------------
Provided by: https://github.com/alexbelgium/hassio-addons
-----------------------------------------------------------
Defining permissions for main user :
User UID: 1000
User GID : 1000
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
ALLOW_SIGNUP='false'
PGID='1000'
PUID='1000'
certfile='fullchain.pem'
keyfile='privkey.pem'
ssl='true'
Timezone set from Etc/UTC to America/New_York
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory
Load environment variables from /config/addons_config/mealie/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/mealie/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
... no env variables found, exiting
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_config/mealie/mealie.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/31-nginx.sh: executing
[16:21:15] INFO: Exporting variables
ALLOW_SIGNUP=false
PGID=1000
PUID=1000
certfile=fullchain.pem
keyfile=privkey.pem
ssl=true
[16:21:18] INFO: config.yaml found in /config/addons_config/mealie/config.yaml, exporting variables
Permissions adapted
[16:21:18] INFO: Starting nginx
[16:21:18] INFO: Starting app
Switching to dedicated user
User uid: 1000
User gid: 1000
Traceback (most recent call last):
File "/app/mealie/db/init_db.py", line 10, in <module>
from mealie.core import root_logger
File "/app/mealie/core/root_logger.py", line 60, in <module>
logger_config = get_logger_config()
File "/app/mealie/core/root_logger.py", line 28, in get_logger_config
settings = get_app_settings()
File "/app/mealie/core/config.py", line 40, in get_app_settings
return app_settings_constructor(env_file=ENV, production=PRODUCTION, data_dir=determine_data_dir())
File "/app/mealie/core/settings/settings.py", line 190, in app_settings_constructor
**{"SECRET": determine_secrets(data_dir, production)},
File "/app/mealie/core/settings/settings.py", line 16, in determine_secrets
if secrets_file.is_file():
File "/usr/local/lib/python3.10/pathlib.py", line 1322, in is_file
return S_ISREG(self.stat().st_mode)
File "/usr/local/lib/python3.10/pathlib.py", line 1097, in stat
return self._accessor.stat(self, follow_symlinks=follow_symlinks)
PermissionError: [Errno 13] Permission denied: '/config/addons_config/mealie_data/.secret'
Architecture
amd64
OS
HAos, Virtual Machine
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
Commits related to this issue
- Update run.txt https://github.com/alexbelgium/hassio-addons/issues/1201 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Update run.txt https://github.com/alexbelgium/hassio-addons/issues/1201 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Update config.json https://github.com/alexbelgium/hassio-addons/issues/1201 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Disable user change https://github.com/alexbelgium/hassio-addons/issues/1201 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Test new version disabling user change https://github.com/alexbelgium/hassio-addons/issues/1201 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Update config.json https://github.com/alexbelgium/hassio-addons/issues/1201#issuecomment-1911847596 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Correct error https://github.com/alexbelgium/hassio-addons/issues/1201#issuecomment-1911847596 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Removed non root https://github.com/alexbelgium/hassio-addons/issues/1201 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Remove non root https://github.com/alexbelgium/hassio-addons/issues/1201 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
- Adapt permissions for hidden files https://github.com/alexbelgium/hassio-addons/issues/1201#issuecomment-1912293374 — committed to alexbelgium/hassio-addons by alexbelgium 5 months ago
I’ve updated to the latest version as of this post, but the error message doesn’t appear any different. Here’s the log from version 1.0.0-9_test
mmh I can’t find a way to replicate the error, even when chmodding .secret to another user, changing permissions… I’ll try to push again a version that will make a specific debug message on the file