Ftp – Setting the default permissions for files uploaded via FTP to a directory

ftppermissionsupload

Disclaimer: I'm just a web designer/coder, and server admin stuff is my weakest point of them all. So be easy on me (and very specific).

I'm using a simple CMS (Unify) on a site, where part of the functionality is that the client can upload files to a specified directory (using FTP). The permissions for the upload directory are set to 755. But when files are uploaded through the interface, they are uploaded with permissions set to 640 (instead of 644), so site visitors cannot acces the files.

When I emailed the CMS's support about this, they told me that it was a server setting, and I need to make sure that files uploaded through FTP are set to 644. Makes perfect sense, but I have no idea how to do this. Any help would be greatly appreciated.

This site is a shared site hosted by Network Solutions (Unix), so my access options are limited. I can edit .htaccess files, and php.ini, but that's about all I have access to. It appears I can't even log on via shell.


ETA: 11/11/2010
Thanks all.
I was able to work around this problem by setting up the CMS's settings in a different way. I'd be interested in following up on Nick O'Niel's suggestions, because I think he's on the right track, but unfortunately I can't access the necessary files on this particular server. So, anyway, I'm leaving this open, since the original questions isn't exactly resolved. Unfortunately, I probably can't put a correct answer to the test, since the shared server in question has nearly all of its config files tightly locked down.

Best Answer

Use an FTP client that allows you to control the permissions settings on uploaded files. Good FTP clients will allow you to view file permissions settings, and to do the equivalent of a chmod +r (turn on all read permissions) to uploaded files.

I have had great success with Filezilla client and WinSCP, although the latter is for Windows only.

If you have control over the configuration of the FTP server, it may be possible to force file permissions for uploaded files to be set to a desired state. Without knowing the particular FTP server software in use, it is difficult to say any more.