Webdav upload and wrong modify time stamp (0.7.65, 0.8.34)
Marcin Engelmann
m.engelmann at imagin.com.pl
Tue Mar 30 15:16:00 MSD 2010
Hello,
I noticed that uploading file (webdav) when client_body_temp_path and
document root are on different partitions sets access and modify time
stamps to 1970-01-01 instead of valid time. It works fine if
client_body_temp_path and document root are on the same partition.
I tested nginx 0.7.65 and 0.8.34, both on Debian lenny.
1. Test partition: ext3, default mount options
# mount -o defaults -t ext3 /dev/sda3 /home/nginx-test
2. client_body_temp_path and document root on different partitions
root /home/nginx-test/upload
client_body_temp_path /tmp
# curl -T test.txt http://127.0.0.1:8080/test.txt
# stat /home/nginx-test/upload/test.txt
File: `/home/nginx-test/upload/test.txt'
Size: 5 Blocks: 8 IO Block: 4096 regular file
Device: 803h/2051d Inode: 22896642 Links: 1
Access: (0640/-rw-r-----) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 1970-01-01 00:59:59.000000000 +0100
Modify: 1970-01-01 00:59:59.000000000 +0100
Change: 2010-03-30 10:53:22.000000000 +0200
Wrong access and modify.
3. client_body_temp_path and document root on the same partition
root /home/nginx-test/upload
client_body_temp_path /home/nginx-test/tmp
# curl -T test.txt http://127.0.0.1:8080/test2.txt
# stat /home/nginx-test/upload/test2.txt
File: `/home/nginx-test/upload/test2.txt'
Size: 5 Blocks: 8 IO Block: 4096 regular file
Device: 803h/2051d Inode: 15564807 Links: 1
Access: (0640/-rw-r-----) Uid: ( 33/www-data) Gid: ( 33/www-data)
Access: 2010-03-30 10:57:28.000000000 +0200
Modify: 2010-03-30 10:57:28.000000000 +0200
Change: 2010-03-30 10:57:28.000000000 +0200
Access and modify are OK.
4. My nginx.conf
user www-data;
pid /var/run/nginx.pid;
error_log /var/log/nginx/error.log;
events {
}
http {
server {
listen 127.0.0.1:8080;
access_log /var/log/nginx/access.log;
root /home/nginx-test/upload;
client_max_body_size 4g;
create_full_put_path on;
client_body_temp_path /home/nginx-test/tmp;
# client_body_temp_path /tmp;
dav_methods PUT DELETE MKCOL MOVE;
dav_access user:rw group:r;
}
}
Best regards,
--
Marcin Engelmann
More information about the nginx
mailing list