Can pure-ftpd handle DOS\Windows style backslash in path names?

  • 7010238
  • 01-Mar-2012
  • 07-Mar-2014

Environment

Novell Open Enterprise Server 2 (OES 2) Linux
Novell Open Enterprise Server 11 (OES 11) Linux
SUSE Linux
FTP
pure-ftpd
backslash \ back slash
forward slash /

Situation

Some DOS and Windows FTP Clients allow their native backslash to be used and this is rejected by pure-ftpd as used by OES and SLES.  However, the use of backslash is allowed by NetWare FTP e.g.

Windows FTP Client to NetWare

ftp> cd Shared\Floyd
250 Directory successfully changed to "/Shared/Floyd"

ftp> cd Shared/Floyd
250 Directory successfully changed to "/Shared/Floyd"

Windows FTP Client to OES2/SLES/pure-ftp

ftp> cd Shared\Floyd
550 Prohibited file name: Shared\Floyd

ftp> cd Shared/Floyd
250 OK. Current directory is /Shared/Floyd

Resolution

FTP service (prior to January 2013):
Although the behaviour appears inconsistent, both NetWare FTP and pure-ftpd meet the requirements of RFC959 - http://www.ietf.org/rfc/rfc959.txt - so neither product is technically broken. 

FTP service (January 2013 and following):
An enhancement has been made to allow system administrators to choose whether to allow backslashes in path names.  This feature is available as a parameter on:
  • OES 2 SP3 (on SLES10SP4) with Jan 2013 Maintenance, and
  • OES 11 SP1 (and later)
To enable this feature:
  1. edit /etc/pure-ftpd/pure-ftpd.conf to include the following parameter:

         allow_backslash_in_path

  2. restart pure-ftpd service (or cluster resource if cluster enabled).
More information on this and other features, can be found in the Novell FTP chapter of the Implementation Guide.