Ошибка Permission Denied

Главные вкладки

Аватар пользователя Absurdperson Absurdperson 16 декабря 2013 в 13:11

Здравствуйте. Столкнулся с такой вот неприятной шляпой: на сервере под управлением Ubuntu Server 12.04 стоит виртуальная kvm-машина с той же Ubuntu Server 12.04. На kvm-машине работает drupal-сайт, который крутится на nginx+php5-fpm+mysql. Сайт перенесен туда несколько дней назад, до этого функционировал нормально. Сейчас же проблема следующая - пока подключен к консоли по ssh к серверу - сайт работает, как только отключаюсь (по ssh или через sftp) - сайт падает. Вместо главной, страница с текстом Access Denied или File not found

В логах ошибки примерно такого плана:
*1110 open() "/home/yknewskz/www/yk-news.kz/favicon.ico" failed (13: Permission denied), client: 92.47.122.234, server: , request: "GET /favicon.ico HTTP/1.1", host: "yk-news.kz", referrer: "http://yk-news.kz/novost/pole-chudes-i-pust-govoryat-iz-vechernei-setki-..."

права на папку с сайтом 777, владелец/группа www-data:www-data.

Конфиг nginx

server {
        #listen 80;
        #server_name www.yk-news.kz;
        root /home/yknewskz/www/yk-news.kz; ## <-- Your only path reference.
        #access_log /home/yknewskz/www/yk-news.kz/logs/access_log;
        error_log /home/yknewskz/www/yk-news.kz/logs/error_log;

        # Enable compression, this will help if you have for instance advagg‎ module
        # by serving Gzip versions of the files.
        gzip_static on;

        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }

        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }

        # This matters if you use drush prior to 5.x
        # After 5.x backups are stored outside the Drupal install.
        #location = /backup {
        #        deny all;
        #}

        # Very rarely should these ever be accessed outside of your lan
        location ~* \.(txt|log)$ {
                allow 192.168.0.0/16;
                deny all;
        }

        location ~ \..*/.*\.php$ {
                return 403;
        }

        # No no for private
        location ~ ^/sites/.*/private/ {
                return 403;
        }

        # Block access to "hidden" files and directories whose names begin with a
        # period. This includes directories used by version control systems such
        # as Subversion or Git to store control files.
        location ~ (^|/)\. {
                return 403;
        }

        location / {
                # This is cool because no php is touched for static content
                try_files $uri [user=rewrite]rewrite[/user];
        }

        location [user=rewrite]rewrite[/user] {
                # You have 2 options here
                # For D7 and above:
                # Clean URLs are handled in drupal_environment_initialize().
                #rewrite ^ /index.php;
                # For Drupal 6 and bwlow:
                # Some modules enforce no slash (/) at the end of the URL
                # Else this rewrite block wouldn't be needed (GlobalRedirect)
                rewrite ^/(.*)$ /index.php?q=$1;
        }

        location ~ \.php$ {
                allow all;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                fastcgi_intercept_errors on;
                fastcgi_pass 127.0.0.1:9000;
                #fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
        }

        # Fighting with Styles? This little gem is amazing.
        # This is for D6
        location ~ ^/sites/.*/files/imagecache/ {
        # This is for D7 and D8
        #location ~ ^/sites/.*/files/styles/ {
                try_files $uri [user=rewrite]rewrite[/user];
        }

        location ~* ^.+\.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }
}