2

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.

2 Answers 2

1

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!

2
  • CreateHome on 766 dirmode 766 Like that? With the 766s and dirmode written explicitly like that?
    – Adri C.S.
    Jan 17, 2014 at 10:00
  • Yes that's correct Jan 17, 2014 at 11:12
0

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)

1
  • 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 :) Oct 8, 2012 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .