Nginx: stat() failed (13: permission denied)

后端 未结 16 1862
梦谈多话
梦谈多话 2020-12-04 05:04

I am using the default config while adding the specific directory with nginx installed on my ubuntu 12.04 machine.

server {
        #listen   80; ## listen          


        
16条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 05:52

    In my case, the folder which served the files was a symbolic link to another folder, made with

    ln -sf /origin /var/www/destination
    

    Even though the permissions (user and group) where correct on the destination folder (the symbolic link), I still had the error because Nginx needed to have permissions to the origin folder whole's hierarchy as well.

提交回复
热议问题