When you attempt to create a new FTP container you see the following error,
warning: ftp_put() [function.ftp-put]: .htaccess: Forbidden filename (2)
This message is thrown when the FTP server doesn't allow files to be named by extension only. So far I've seen this on Windows and Akamai's FTP / CDN. This applies to files named .htaccess and the module attempts to store this file when creating a container.
Line 169 in storage_ftp.module
if($success)
$success_ftp = ftp_put($ftp, '.htaccess', $path . '/objects.htaccess', FTP_BINARY);
Line 184 in storage_ftp.module
if($success)
$success = ftp_put($ftp, '.htaccess', $path . '/files.htaccess', FTP_BINARY);
These were my quick fixes, It still thorws the original error but it stores a test file and saves the container. It seems to work for me but its not a clean solution.
Line 169 in storage_ftp.module
if($success) {
$success_htaccess = ftp_put($ftp, '.htaccess', $path . '/objects.htaccess', FTP_BINARY);
if(!$success_htaccess) {
$success = ftp_put($ftp, 'objects.htaccess', $path . '/objects.htaccess', FTP_BINARY);
}
}
Line 184 in storage_ftp.module
if($success) {
$success_htaccess = ftp_put($ftp, '.htaccess', $path . '/files.htaccess', FTP_BINARY);
if(!$success_htaccess) {
$success = ftp_put($ftp, 'files.htaccess', $path . '/files.htaccess', FTP_BINARY);
}
}
- Jayson
Comments
Comment #1
perignon commentedI am a new co-maintainer for Storage_API. Drupal 6 is coming toward end of life as soon as D8 is released which should be by the end of 2014. Due to that, I am going to be closing all 6.x issues as it's a hurdle too far to overcome with the amount of issues in the queue against this module.