Re: Проблема с заливкой файла (PUT) в директорию на отдельной файловой системе.

Denis F. Latypoff denis at gostats.ru
Fri Oct 31 20:38:56 MSK 2008


Здравствуйте, Lior.

Вы писали 31 октября 2008 г., 23:08:18:

> Всем доброго времени.

> Недавно столкнулся с проблемой заливки файлов в location в котором 
> включён WEBDAV.
>         location /file/ {
>                 dav_methods  PUT DELETE MKCOL COPY MOVE;
>                 create_full_put_path   on;
>                 dav_access             group:rw  all:r;
>                 root   /var/www/storage;
>         }

> Заливаю так:
> /test# curl -T file.crp http://host/file/
> <html>
> <head><title>500 Internal Server Error</title></head>
> <body bgcolor="white">
> <center><h1>500 Internal Server Error</h1></center>
> <hr><center>nginx/0.6.32</center>
> </body>
> </html>

> В логе следующее:
> 2008/10/31 19:30:45 [crit] 5946#0: *6 rename() 
> "/var/lib/nginx/body/0000000003" to "/var/www/storage/file/file.crp" 
> failed (18: Invalid cross-device link), client: 192.168.1.167, server:
> server1, request: "PUT /file/file%2Ecrp HTTP/1.1", host: "host"

> Директория /var/www/storage смонтирована с другого носителя (отдельного
> от /var/lib/nginx/body/), в следствии этого и происходит ошибка в вызове
> rename().

> Вопрос: Как заставить это работать ?

man 2 rename:

...
RETURN VALUE
       On  success, zero is returned.  On error, -1 is returned, and errno is
       set appropriately.

ERRORS

...
       EXDEV  oldpath and newpath are not on the same filesystem.
...


> Спасибо,
> Л.



-- 
С уважением,
 Denis                          mailto:denis at gostats.ru






More information about the nginx-ru mailing list