Solved

avoid vsftpd changing modification time in uploads

Posted on 2010-11-28
4
1,962 Views
Last Modified: 2013-11-22
Hi
I'm running a vsftpd on ubuntu server. All users can upload files fine using their username.
But, every time a new upload comes, (even without change any files), the mtime of all files on the vsftpd side is updated to the actual time. How can I avoid vsftpd to change the time? Or set the same time that remotefiles?
Is it possible?
0
Comment
Question by:sminfo
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Michael W
ID: 34227661
No, this is not possible. The time is obtained from the server-side the client is connecting into and written to the file. VSFTPD and other FTP daemons were coded this way to prevent a client from uploading older data to the server to overwrite newer data files for possible rootkits and other types of server-side abuse.

Example of abuse: If the VSFTPD did allow for keeping the older 'date' of the uploaded file, server-side applications could be at risk (i.e. allowing a modified (rootkit-based) version of '/usr/bin/passwd' to be uploaded while still showing the older date release of what was originally on the server).

0
 

Accepted Solution

by:
sminfo earned 0 total points
ID: 34228387
well... after some google's search.. I found that if you use ncftpput (ncftpd) as client with -y option it preserve the timestamp, so when you upload files the files are copied with the same time as in the source server.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34228736
Yep,

and that's due to the setting "mdtm_write  YES" in vsftpd.conf, which is the default.

wmp
0
 

Author Closing Comment

by:sminfo
ID: 34276708
Issue solved!
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now