ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rename() failed (13: Permission denied).


  • To: nginx-ru@xxxxxxxxx
  • Subject: rename() failed (13: Permission denied).
  • From: "Владислав Комиссаров" <vk@xxxxxxxxxx>
  • Date: Thu, 21 Aug 2008 17:25:19 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:x-google-sender-auth; bh=9uZTiMmnw4TCWYQw3iEXR+0n8eHSnv71Qmd28XiQlu4=; b=h6eI3uDwEvNNiPqdnkgmNGdmcqBin0xfdcvUfqLDteYjnxNFsE9e+XLEq+t+DiRxxG d+vdUGe6WYvsdtiZEQREop5ONALZDrMdpR9OUfIWKjjzJDR0TNf58Ua4aZUs9beK7ZPa R5hjcAyWTPRQ20RfCbWXaferQu+Gvm8PtI/q8=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=JmQJpTVHxLLJDeNZH+f+MmeatJFFGWGuKOf7rYA4uKaoF1+S2F6QNPeEEMY1+CrhsL nWUQPbvAEOLk+uGPdo5Gt7fmtFqM2q/avf2DQqGsOX4prdOM6sHklg0jLZWnRh7mG+ap n04hAGOzlIVuq2QHTHmHYvozhw6rZknV4ohZ8=

Заметил в error.log следующую ошибку:

2008/08/21 16:49:12 [crit] 31836#0: *316 rename() "/var/tmp/nginx/fastcgi/3/04/0000000043" to "/var/www/phpMyAdmin/navigation.php" failed (13: Permission denied) while reading upstream, client: 89.175.80.253, server: mysql.domain.ru, request: "GET /navigation.php?token=83f3ab3525f0dba8d3aba091e4004678 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php.sock:", host: "mysql.domain.ru", referrer: "http://mysql.domain.ru/"

Если дать nginx права записи (chown -R www-data:www-data /var/www/phpMyAdmin/)  то вот кусок того, что становится с файлом.

^_<8b>^H^@^@^@^@^@^@^C?]yo^[G<96>?_<9f>??<80>,id?I?:-r!Kr?^X_#??d^M<83>i²<8b>b??n?^O^]<99>^M^P;<9b>?.<9c>M2A<80>^M^F<98>?:???^B²'^;>?^B?<8d>???>?&?<94>HN?n^C???^U?z??^]??c????<8d><9d><8f>nl<91><9a>UW?<8d>[^W?\? ?<9c>(???<86>(n?l<92>^O^??s?

До этого, на его месте был стройненький код пхпмайадмина.

/usr/local/nginx/sbin/nginx -V
nginx version: nginx/0.7.11
built by gcc 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
configure arguments: --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access_log --error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --with-pcre=../pcre-7.7 --with-zlib=../zlib-1.2.3 --without-select_module --without-http_ssi_module --without-http_userid_module --without-http_auth_basic_module --without-http_geo_module --without-http_map_module --without-http_referer_module --without-http_memcached_module --without-http_empty_gif_module --without-http_browser_module --without-http_upstream_ip_hash_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module


Конфиг:

server {
  listen         80;
  server_name    mysql.domain.ru;
  set $srv_root  /var/www/phpMyAdmin;

  root $srv_root;

  location / {
    index index.html index.php;
  }

  location ~* \.php$ {
  fastcgi_pass   unix:/var/run/php.sock;
  fastcgi_index index.php;
  fastcgi_connect_timeout 30;
  fastcgi_send_timeout 300;

  fastcgi_read_timeout 300;
  fastcgi_buffer_size 32k;
  fastcgi_buffers 4 32k;
  fastcgi_busy_buffers_size 32k;
  fastcgi_store           on;
  fastcgi_store_access    user:rw  group:rw  all:r;

  fastcgi_temp_file_write_size 32k;

  fastcgi_intercept_errors on;

  fastcgi_param   DOCUMENT_ROOT   $srv_root/;
  fastcgi_param   SCRIPT_FILENAME $srv_root$fastcgi_script_name;
  fastcgi_param   PATH_TRANSLATED $srv_root$fastcgi_script_name;
  fastcgi_param   SCRIPT_NAME     $fastcgi_script_name;
  fastcgi_param   QUERY_STRING    $query_string;
  fastcgi_param   REDIRECT_STATUS 200;

  fastcgi_param   CONTENT_TYPE    $content_type;
  fastcgi_param   CONTENT_LENGTH  $content_length;

  fastcgi_param   SERVER_ADDR     $server_addr;
  fastcgi_param   SERVER_PORT     $server_port;
  fastcgi_param   SERVER_PROTOCOL $server_protocol;
  fastcgi_param   SERVER_SOFTWARE "nginx";
  fastcgi_param   GATEWAY_INTERFACE       "CGI/1.1";
  fastcgi_param   SERVER_NAME     $server_name;
  fastcgi_param   REQUEST_URI     $request_uri;
  fastcgi_param   REQUEST_METHOD  $request_method;
  fastcgi_param   REMOTE_USER     $remote_user;
  fastcgi_param   REMOTE_ADDR     $remote_addr;
  fastcgi_param   REMOTE_PORT     $remote_port;
  }

  location ~* ^.+.(zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|wmv|avi|swf)$ {
      root     $srv_root/;
      expires         30d;
  }
}



 




Copyright © Lexa Software, 1996-2009.