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.

I've been having a complete nightmare trying to configure proftpd. I've got proftp server working with an sql database. However I want to have any files uploaded able to viewed by the webserver running on the same box.

The folders get created in /var/tmp/ as

rwx------  2 ftpuser ftpgroup 4096 Oct  8 20:35 50730c4346512
drwx------  2 ftpuser ftpgroup 4096 Oct  8 20:38 50730f3a811ca

I've tried adding www-data to group with the following

usermod -g www-data ftpuser

But this doesn't allow the web server access.

In proftpd.conf I have the following umask set

Umask                           0022

It doesn't seem to make a difference what I set that value to.

/etc/group (sure I've messed up one of these two but I'm getting desperate)

ftpgroup:x:2001:www-data
www-data:x:33:ftpgroup

/etc/passwd

www-data:x:33:33:www-data:/var/www:/bin/sh
proftpd:x:108:65534::/var/run/proftpd:/bin/false
ftp:x:109:65534::/srv/ftp:/bin/false
ftpuser:x:2001:33:proftpd user www-data:/bin/null:/bin/false

The ftpuser table in the database has uid / gid set to 2oo1 for both.

I'm going absolutely crazy trying to solve this any help would be greatly appreciated.

p.s

Also, although if I manually connect to the ftp server I can upload files via FileZilla. Although this isn't working for the web-camera, although there is talky talky going on between the server and the camera.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

After hours of searching....

The problem was in proftpd.conf I had.

CreateHome on

And I needed to have

CreateHome on 766 dirmode 766

Hours of my life I'll never get back, hopefully this will save someone else some hours later!

share|improve this answer
    
Good find. Make sure to mark this answer as accepted! –  Aaron Copley Oct 9 '12 at 12:45
    
CreateHome on 766 dirmode 766 Like that? With the 766s and dirmode written explicitly like that? –  Adri C.S. Jan 17 at 10:00
    
Yes that's correct –  Alan Hollis Jan 17 at 11:12

In proftpd.conf I have the following umask set

Umask                           0022

It doesn't seem to make a difference what I set that value to.

Silly question, but you did restart the service, right? I am looking at the ProFTPd docs and it describes what you are doing as correct.

Another thing to check is make sure the Umask isn't being overridden the init script (/etc/init.d/proftpd) and options file. (/etc/sysconfig/proftpd)

share|improve this answer
    
Restard about 100 times :(. Cant see anything in /etc/init.d/proftpd which would overwrite those settings, and there's no /etc/sysconfig. So that ones safe. Thanks for taking time to reply :) –  Alan Hollis Oct 8 '12 at 20:57

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.