Forums

OSError when trying to access static files

Everything has been working great on my project, I had it serving static files fine, but then today I started getting an OSError - [Errno 13] Permission denied '/static'

I have tried resetting all permissions to 755 and then 777, everything is owned by user nino and group registered_users. I traced it back to /usr/lib/python2.7/os.py, the "makedirs" function. And I did add the static directory path to the static files section in the online admin. No luck yet.

Please let me know if anyone has had this issue or knows how to go about solving. Thanks

I deleted the project and its virtualenv, made a brand new virtualenv, new project, defined static file path in online admin... still no luck

This has been solved. It turned out to be a simple mezzanine issue, not a permission issue. In case anyone else runs across this issue, here is what happened... I traced the error back to /usr/lib/python2.7/os.py, then from there I traced it further and found that makedirs() was failing when it tried to access/create a thumbnail. To make a long story short, I deleted all the images in my project and re-uploaded them through the mezzanine admin, which seems to have fixed everything.

Thanks for posting the solution!