3

Is it possible to configue Pure-fptd to use a temporary filename during upload?

At the moment files that are uploaded are given their final name from the very start of the upload. I would like it to have temporary name until the file is completely transfered. First then should the file get its final name. Preferably the file would not be visible in the file listing during upload.

The only setting I've seen and tried is the notruncate but it assumes that there is a file present but I might have missed some other vital option.

Castaglia
  • 3,239
  • 3
  • 19
  • 40
John P
  • 195
  • 2
  • 9

2 Answers2

3

Yes, NoTruncate does what you need.

Despite the wording in the configuration file, this option does not require a file with the same name to exist on the server.

To enable it:

  • in Pure-FTPD 1.0.29 (on Fedora) you would set in /etc/pure-ftpd/pureftpd.conf:

NoTruncate yes

  • in Pure-FTPD 1.0.36 (on Ubuntu) you would create a file called NoTruncate in /etc/pure-ftpd/conf/ and set its content to yes.
Sergiu
  • 41
  • 3
  • This is not documented in manpage http://manpages.ubuntu.com/manpages/wily/man8/pure-ftpd-wrapper.8.html but by looking at `pure-ftpd-wrapper` source code seems supported. – Gian Marco Jan 27 '16 at 13:29
  • I can confirm this works on ubuntu 16.04 LTS. Did not find any docs so far on this topic despite of this entry in SO. Thank you! – merlin Apr 01 '19 at 11:27
1

No, you would have to implement a temporary filename during uploads in the FTP client, followed by a rename command.

You could upload to temp file starting with a . dot and use the PureFTP switch --prohibitdotfilesread to prevent downloading during the upload, then rename to the final file name which should be atomic.

HBruijn
  • 72,524
  • 21
  • 127
  • 192