Closed KIC closed 1 week ago
django.BASE_DIR
is not a reliable setting for “all the files in the project”. For example, TEMPLATES
can be configured with paths outside of it.
django-watchfiles does nothing special with paths - it only tries to watch the paths that Django would watch anyway - python files, templates, etc. I would expect that if you see an error with watchfiles, you see it without (Django’s StatLoader
), or at least with Django’s Watchman support. Can you check those options?
I would prefer a setting variable where we can exclude certain paths. much like https://github.com/adamchainz/django-watchfiles/issues/11
for now i sudo chmod 777 my docker volume. it works but it's nasty and I have to do this quite often.
You didn’t respond to my request about what happens with StatLoader
or watchman.
I am not sure we should add any setting here, as the file paths to watch all come from Django.
Closing for now, unless we get any extra details.
Python Version
3.11
Django Version
5.x
Package Version
0.1.0
Description
Watchfiles watches files outside of the django BASE_DIR i.e. in local docker volumes and fails with permission denied.
PermissionError: Permission denied (os error 13) about
Warchfiles should only watch from BASE_DIR or allow some folders to be excluded via configuration.