close

[Solved] OS – Errno 13 Permission denied

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error OS – Errno 13 Permission denied in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How OS – Errno 13 Permission denied Error Occurs?

Today I get the following error OS – Errno 13 Permission denied in python.

How To Solve OS – Errno 13 Permission denied Error ?

  1. How To Solve OS – Errno 13 Permission denied Error ?

    To Solve OS – Errno 13 Permission denied Error You need to change the directory permission so that web server process can change the directory.

  2. OS – Errno 13 Permission denied

    To Solve OS – Errno 13 Permission denied Error You need to change the directory permission so that web server process can change the directory.

Solution 1

You need to change the directory permission so that web server process can change the directory.

  • To change ownership of the directory, use chown:chown -R user-id:group-id /path/to/the/directory
  • To see which user own the web server process (change httpd accordingly):ps aux | grep httpd | grep -v grep ORps -efl | grep httpd | grep -v grep

Solution 2

This may also happen if you have a slash before the folder name:

path = '/folder1/folder2'

OSError: [Errno 13] Permission denied: '/folder1'

comes up with an error but this one works fine:

path = 'folder1/folder2'

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read