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

PermissionError: [Errno 13] Permission denied: '/config' #79

Open
jangerhard opened this issue Jun 5, 2023 · 2 comments · May be fixed by #89
Open

PermissionError: [Errno 13] Permission denied: '/config' #79

jangerhard opened this issue Jun 5, 2023 · 2 comments · May be fixed by #89
Labels
bug Something isn't working

Comments

@jangerhard
Copy link

I am using the python version of the program, and for some reason I can load the config-file I've created, under the config-folder, but I get an error running the program.

Full stack-trace:

[USER]@[MACHINE]:~/.apps/Plex-Auto-Languages$ python3 main.py -c ./config/config.yaml
2023-06-05 10:35:35,437 [INFO] Parsing config file './config/config.yaml'
2023-06-05 10:35:35,439 [INFO] The provided configuration has been successfully validated
Traceback (most recent call last):
  File "/home/user/.apps/Plex-Auto-Languages/main.py", line 117, in <module>
    plex_auto_languages = PlexAutoLanguages(args.config_file)
  File "/home/user/.apps/Plex-Auto-Languages/main.py", line 27, in __init__
    self.config = Configuration(user_config_path)
  File "/home/user/.apps/Plex-Auto-Languages/plex_auto_languages/utils/configuration.py", line 74, in __init__
    self._add_system_config()
  File "/home/user/.apps/Plex-Auto-Languages/plex_auto_languages/utils/configuration.py", line 128, in _add_system_config
    os.makedirs(self._config["data_dir"])
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/config'

I've tried changing the owner to myself, with chown, and I've tried to give all files permission 777 with chmod.

@RemiRigal RemiRigal added the bug Something isn't working label Aug 11, 2023
@RemiRigal
Copy link
Owner

It appears that Plex-Auto-Languages wrongly identify your environment as a Docker container one, that's why it's trying to create a /config directory.

Could you give me additional information about your operating system ? Are running inside a VM or LXC container ?

If either one of the following conditions is true, Plex-Auto-Languages assumes that it runs inside a Docker container:

  • The file /.dockerenv exists
  • The file /proc/self/cgroup exists and contains at least a line with the work docker in it
  • The environment variable CONTAINERIZED exists and is set to true

Could you check these conditions and provide the results ? Thanks.

@jangerhard
Copy link
Author

jangerhard commented Aug 12, 2023

I'm trying to run this inside a VM.

  • /.dockerenv does indeed exist
  • The file /proc/self/cgroup exists and contains 12 lines with the word docker in it
  • The environment variable CONTAINERIZED does not exist

Is there a way of overriding this behaviour?

@RemiRigal RemiRigal linked a pull request Aug 18, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants