Hi Anaïs, yes, the arches.log permissions are something that need to be
handled.

Briefly, that file needs to be written to by whichever user is running the
app. If you use the dev server (python manage.py runserver) then, in your
case, that user is ubuntu. If you are serving the app with apache, then the
user is www-data. These two commands should handle it for you.

First set the owner of the file as ubuntu and the group of the file
www-data:

    sudo chown ubuntu:www-data /home/ubuntu/Projects/hpm/hpm/arches.log

Then change the file permissions so both the owner and the group have read
and write permissions (also allow other users to read the file though
that's probably irrelevant):

    sudo chmod 664 /home/ubuntu/Projects/hpm/hpm/arches.log

You can read more about permissions on Linux here:
https://www.linux.com/training-tutorials/understanding-linux-file-permissions/

Hope that helps.

Adam

On Thu, Aug 13, 2020 at 7:21 PM [email protected] <[email protected]>
wrote:

> Hi Angela,
> Thanks a lot for your answer, yes it is the same error.
> When I run the python manage.py showmigrations command, I get the
> following error:
>
> (ENV) *ubuntu@ip-172-31-72-128*:*~/Projects/hpm*$ python3 manage.py
> showmigrations
>
> No module named 'arches.settings_local'
>
> Error attempting to load settings from relative '.settings_local'.
> Attempting 'arches.settings_local' import
>
> Error attempting to load settings from 'arches.settings_local.py'.
>
> No module named 'arches.settings_local'
>
> Traceback (most recent call last):
>
>   File "/usr/lib/python3.8/logging/config.py", line 563, in configure
>
>     handler = self.configure_handler(handlers[name])
>
>   File "/usr/lib/python3.8/logging/config.py", line 744, in
> configure_handler
>
>     result = factory(**kwargs)
>
>   File "/usr/lib/python3.8/logging/__init__.py", line 1143, in __init__
>
>     StreamHandler.__init__(self, self._open())
>
>   File "/usr/lib/python3.8/logging/__init__.py", line 1172, in _open
>
>     return open(self.baseFilename, self.mode, encoding=self.encoding)
>
> PermissionError: [Errno 13] Permission denied:
> '/home/ubuntu/Projects/hpm/hpm/arches.log'
>
>
> The above exception was the direct cause of the following exception:
>
>
> Traceback (most recent call last):
>
>   File "manage.py", line 30, in <module>
>
>     execute_from_command_line(sys.argv)
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 381, in execute_from_command_line
>
>     utility.execute()
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/core/management/__init__.py",
> line 357, in execute
>
>     django.setup()
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/__init__.py",
> line 19, in setup
>
>     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
>
>   File
> "/home/ubuntu/Projects/ENV/lib/python3.8/site-packages/django/utils/log.py",
> line 76, in configure_logging
>
>     logging_config_func(logging_settings)
>
>   File "/usr/lib/python3.8/logging/config.py", line 808, in dictConfig
>
>     dictConfigClass(config).configure()
>
>   File "/usr/lib/python3.8/logging/config.py", line 570, in configure
>
>     raise ValueError('Unable to configure handler '
>
> ValueError: Unable to configure handler 'file'
>
>
>
> And when I check the permissions of the arches.log file it is:
>
>  -rwxr-xr-x 1 root root  22322 Aug 11 14:29 *arches.log*
>
> In the arches.log there is no recent log as to be expected. How should I
> change the permissions for this file?
>
>
> Thanks again for any answer,
>
> best
>
> A.
> Le mardi 11 août 2020 à 12:10:04 UTC-7, [email protected] a écrit :
>
>> Hi Anais,
>>
>> Dale reported a similar error in version 4:
>> https://groups.google.com/d/msg/archesproject/gYnmrToi8eE/PUJ-6ys-AQAJ
>>
>> I'm not sure if the same troubleshooting would apply for v5, but do you
>> have pending migrations to run as Cyrus suggested in that thread?
>>
>> Angela
>>
>>
> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/archesproject/b182dfff-77b7-47fa-98ae-3e072e32d091n%40googlegroups.com
> <https://groups.google.com/d/msgid/archesproject/b182dfff-77b7-47fa-98ae-3e072e32d091n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/archesproject/CAGYBTatHN4q7kRMemzEs9ugyGzXwwkZEYjvW8TbEgmTf4ryk1g%40mail.gmail.com.

Reply via email to