2026, 새로운 도약을 시작합니다.

우성짱님의 도커로 멀티도메인구성후 로그인 안되는현상~ 채택완료

에러메세지가.

2021/06/22 16:26:43 [error] 23#23: *1 FastCGI sent in stderr: "PHP message: PHP Warning:  chmod(): Operation not permitted in /var/www/html/gnuboard/lib/Cache/FileCache.class.php on line 156" while reading response header from upstream, client: 172.27.0.1, server: g5.localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://172.27.0.8:9000", host: "g5.localhost"

와같이 나고 로그인이 안되네요~~

해당소스는 lib/Cache/FileCache.class.php의

Copy


        if ($this->write_file($cache_file_path, $cache_content))

        {

            chmod($cache_file_path, G5_FILE_PERMISSION);

            return TRUE;

        }

nginx의 그누보드설정파일은 

Copy


server {

        listen 80;

        listen [::]:80;

 

        server_name g5.localhost;

        root /var/www/html/gnuboard;

        index  index.php index.html;

 

    location / {

        try_files $uri $uri/ /index.php$is_args$args;

    }

 

    location ~ [^/]\.php(/|$) {

        fastcgi_pass php:9000;

        fastcgi_index index.php;    

        fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;

        include       fastcgi_params;

    }

}

답변 2개

/lib/Cache/FileCache.class.php on line 156

여기 보시면

                        chmod($cache_file_path, G5_FILE_PERMISSION);
로 되어 있습니다.

                        @chmod($cache_file_path, G5_FILE_PERMISSION);

이렇게 변경해 보세요.
permission 문제는 해결이 안 되지만 warning 메시지로 인한 부작용은 막을 수 있습니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

data/cache 폴더 퍼미션 확인해 보세요.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

폴더퍼미션은 777로 주었고.......유저는 관리자권한까지준상태입니다.
data/cache 폴더의 owner는 어떤 user인가요?
nginx는 어떤 user의 프로세스로 돌아 가나요?
selinux 설정은 어떻게 되어 있나요?

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고