Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
What is the ftp server software? –  Mark Wagner Nov 4 '10 at 19:12
    
... and what is the FTP client software? –  Steven Monday Nov 4 '10 at 19:17
    
The FTP in question is not client software, but rather via a closed-source php-driven CMS. As far as the ftp server software— the server is a typical LAMP setup. Is there something specific to the ftp functionality I can look at? I'm not sure. –  Kerri Nov 11 '10 at 18:22

2 Answers 2

This sounds like it is due to the permissions set on the ftp server itself. See if you have a configuration file in /etc/ named proftpd.conf It might also be in /usr/local/etc/proftpd.conf If you do edit this file and change your umask setting to 022

share|improve this answer
    
Unfortunately, I don't have access to any root files. The best I can get my hands on is the php.ini, and I can add .htaccess wherever I need to. (I hate this client's server!). It's a really locked-down shared server. –  Kerri Nov 11 '10 at 18:24

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.

share|improve this answer
    
Thanks, but this isn't via an FTP client. The uploads are FTP uploads via a closed source CMS. When I upload files there are no problems setting the permissions. It's files uploaded via the CMS. –  Kerri Nov 11 '10 at 18:21
    
Whoops, looks like I misread your question. Sorry for the noise. It seems to me, though, that if the CMS is allowing files uploaded through its interface to have incorrect permissions settings, then that's a bug in the CMS. –  Steven Monday Nov 11 '10 at 22:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.