Solved

avoid vsftpd changing modification time in uploads

Posted on 2010-11-28
4
2,071 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 Worsham
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maybe no no httpd.conf 6 77
Disabling security updates Ubuntu 3 43
Advice on ESXi 5.1 Health / Storage 1 40
check the file dates in unix 14 21
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

713 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