chaoss/grimoirelab

Mordred permission log issue

bliu11 opened this issue · 3 comments

I am trying to run with docker compose on windows but running into the following error regarding mordred.

2023-02-27 14:35:14 Traceback (most recent call last):
2023-02-27 14:35:14   File "/usr/local/bin/sirmordred", line 8, in <module>
2023-02-27 14:35:14     sys.exit(main())
2023-02-27 14:35:14   File "/usr/local/lib/python3.8/site-packages/sirmordred/bin/sirmordred.py", line 65, in main
2023-02-27 14:35:14     logger = setup_logs(logs_dir, debug_mode)
2023-02-27 14:35:14   File "/usr/local/lib/python3.8/site-packages/sirmordred/bin/sirmordred.py", line 93, in setup_logs
2023-02-27 14:35:14     fh = logging.FileHandler(fh_filepath)
2023-02-27 14:35:14   File "/usr/local/lib/python3.8/logging/__init__.py", line 1147, in __init__
2023-02-27 14:35:14     StreamHandler.__init__(self, self._open())
2023-02-27 14:35:14   File "/usr/local/lib/python3.8/logging/__init__.py", line 1176, in _open
2023-02-27 14:35:14     return open(self.baseFilename, self.mode, encoding=self.encoding)
2023-02-27 14:35:14 PermissionError: [Errno 13] Permission denied: '/home/grimoire/logs/all.log'

I've tried the solution posted here but it didn't work for me.
#202 (comment)

How do I resolve this permissions issue?

Hi @bliu11

I guess you are using this configuration so that means your docker user cannot create files on /tmp/. You can create a new directory where docker has permission to create files.

    mordred:
      restart: on-failure:5
      image: grimoirelab/grimoirelab:latest
      volumes:
        - <NEW-DIRECTORY>:/home/grimoire/logs

I don't use Windows but I found this solution. Could you try it?

I hope it helps you

Hi, thanks for responding. It doesn't seem docker have that setting anymore. I tried creating a new directory but I'm still getting the same message.

Closing this due to no activity, feel free to reopen it again if the problem still exists.