OSError - Errno 13 Permission denied

后端 未结 7 1289
花落未央
花落未央 2020-12-04 18:09

I am trying to upload image through admin page, but it keeps saying:

[Errno 13] Permission denied: \'/path/to/my/site/media/userfolder/2014/05/26\'
<         


        
7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 18:40

    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
      

      OR

      ps -efl | grep httpd | grep -v grep
      

提交回复
热议问题