Question

([Errno 13] Permission denied)

Posted July 2, 2021 89 views
PostgreSQLDjangoUbuntu 20.04

I am getting an error when submitting an image from django admin.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @ahmedhassana007,

This sounds like an ownership or permission issue.

First, I’ll recommend trying to fix your permissions, most probably, each directory needs to have 755 permissions and each file 644. Try with that.

You can try and use the following command:

find /path/to/app -type d -exec chmod 755 {} \; find /path/to/app -type f -exec chmod 644 {} \;

Remember to change /path/to/app with the actual path to your website.

If that doesn’t work, you’ll need to change the ownership of the files. Let me know which WebService you are running so that I can further help out.