Question concerning: virtual-hosting-with-pureftpd-and-mysql-ubuntu-7.10

Discussion in 'HOWTO-Related Questions' started by Baggus, May 6, 2008.

  1. Baggus

    Baggus New Member

    Hi all,

    Firstly i would like to say that this great tutorial works fine on 8.04 LTS :)

    The only thing i would like to do (and isn't covered in the tutorial) is to change the user that runs PureFTPd.

    Why? Apache needs to be able to delete stuff that is uploaded through FTP (and the other way around).

    I have tried adding users in phpMyAdmin with the uid and gid of Apache.
    [email protected]:~# cat /etc/passwd | grep www
    Which is according to this 33 and 33.
    So i figured this would do the trick:
    INSERT INTO `pureftpd`.`ftpd` (`User`, `status`, `Password`, `Uid`, `Gid`, `Dir`, `ULBandwidth`, `DLBandwidth`, `comment`, `ipaccess`, `QuotaSize`, `QuotaFiles`) VALUES ('testtest', '1', MD5('testpass'), '33', '33', '/var/www', '0', '0', 'test user', '*', '0', '0')
    But then i get:
    [email protected]:~# ftp localhost
    Connected to localhost.
    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    220-You are user number 1 of 50 allowed.
    220-Local time is now 20:30. Server port: 21.
    220-This is a private system - No anonymous login
    220-IPv6 connections are also welcome on this server.
    220 You will be disconnected after 15 minutes of inactivity.
    Name (localhost:root): testtest
    331 User testtest OK. Password required
    530 Sorry, but I can't trust you
    Login failed.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    530 You aren't logged in
    ftp: bind: Address already in use
    I was wondering if anyone has a clue on howto fix this?

    Many thanks in advance!

    And btw, a little suggestion (don't think its worth opening a second thread)

    Maybe in the next tutorial on this please tell people how they can set the passive port range, i ended up using
    echo '50000 50500' > /etc/pure-ftpd/conf/PassivePortRange
    To set the passive port range, wich worked fine :)
  2. Baggus

    Baggus New Member

    If you know this isn't possible your reply is welcome aswell, then i can think of something else to fix this with. :(
  3. falko

    falko Super Moderator ISPConfig Developer

    I think the problem is that the UID of the FTP user must be > 1000 whereas Apache's UID is 33... You could modify the UID in /etc/passwd, but then you'd have to chown all files owned by Apache so that they're owned by Apache again...

Share This Page