a-lowercase-pathnames |
NcFTPd domain.cf file configuration Don't forget to restart NcFTPd after modifying the domain.cf file. |
This option may be useful if you need to work in an environment whose filenames are case-insensitive. This option converts all pathnames to lowercase for anonymous users.
For this option to work, all existing files in the filesystem need to be renamed to lowercase. From then on, any new files added through FTP will be converted to lowercase, and any file requested by an FTP client program can be case-insensitive.
Any new files added directly to the filesystem (i.e. not uploaded through FTP) must have lowercase pathnames to be accessible. For this reason, as well as the fact that it degrades performance, it is recommended that you leave this option disabled.
Here's an easy way to convert an existing directory tree to lowercase pathnames:
find /home/ftp -depth -print | awk ' BEGIN{print "#!/bin/sh";} { a = $0; b = tolower(a); if (a != b) { printf("\necho /bin/mv -i %s%s%s %s%s%s\n", q,a,q, q,b,q); printf("/bin/mv -i %s%s%s %s%s%s\n", q,a,q, q,b,q); } }' q="'" | /bin/sh
Examples:
Recommendation:
See Also: