#31912: pathlib PermissionError problem -------------------------------+-------------------------------------- Reporter: leonyxz | Owner: nobody Type: Bug | Status: closed Component: Uncategorized | Version: 3.1 Severity: Normal | Resolution: needsinfo Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by tytusd): Hi Carlton, thanks for looking into this. I have just been hit by this problem in all of my Django-based projects (as I host all of them in similarly set up environments). It looks like its clearly a regression - everything works fine with Django==3.0.8. I created a ticket #31945 (https://code.djangoproject.com/ticket/31945) with my stack trace clearly showing the regression (sorry I did not find this ticket before submitting mine..) - please take a look. There is no way to give the user running the website full access to entire '/usr' directory (server admins won't agree, it is a managed environment). And I do not see any reason why would this be needed? The project is set up inside of user's home dir, similarly the virtual environment is inside of the user's home directory. What has changed between 3.0.8 and 3.1.0 that this problem started occuring? This issue prevents me from updating Django version in all of my projects. I would really appreciate if some fix could be considered. Replying to [comment:1 Carlton Gibson]: > Hi. Interesting. I'm struggling to see what if anything we can or should do here. > > So this is the call we're making: > > > `BASE_DIR = Path(__file__).resolve(strict=True).parent.parent` > > from `settings.py`. > > If that raises `PermissionDenied` then (surely, I want to say) your permissions are just set wrong (too strict). > > I can't see how it's meant to be an issue in Django? > > (Sorry if I'm missing it...) -- Ticket URL: <https://code.djangoproject.com/ticket/31912#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.aadda8c65fe75ac93567cca2faac5cba%40djangoproject.com.