ProFTPd - 500 Permission denied - can't upload

Discussion in 'Server Operation' started by jvilches, Aug 5, 2006.

  1. jvilches

    jvilches New Member

    Hello,

    I'm a linux newbie and it is my first time installing a server. I followed the The Perfect Setup - Ubuntu 6.06 LTS Server (Dapper Drake) guide with no problems.

    The only problem is that the webserver is in /var/www and the default FTP upload directory is /home/admin... so basically I can't upload any website at all.

    Looking through some documentation I changed my config file from this:
    To this:

    So now I can see the directory where my web files are stored, but when I tried to upload I get an 500 Error telling me Permission denied.

    Then I changed to:

    In order to have acces to both directories (/var/www and /home/admin) and apparently I have all the permissions to write in /home/admin but no permissions in /var/www... I need to use this server as a webserver. Please help! How do I set up this permissions?

    As a side note... I didn't install ISPConfig because I think I have to install it from my /var/www directory and I couldn't upload the files there. Is this correct?
    Also I am not sure if I need it, I wan't this server for seting up an intranet, and the graphical control panel sounded good for a newbie like me.
     
  2. jvilches

    jvilches New Member

    This is my proftpd.conf file

    #
    # /etc/proftpd.conf -- This is a basic ProFTPD configuration file.
    # To really apply changes reload proftpd after modifications.
    #

    DefaultRoot ~
    IdentLookups off
    ServerIdent on "FTP Server ready."

    ServerName "Debian"
    ServerType standalone
    DeferWelcome off

    MultilineRFC2228 on
    DefaultServer on
    ShowSymlinks on

    TimeoutNoTransfer 600
    TimeoutStalled 600
    TimeoutIdle 1200

    DisplayLogin welcome.msg
    DisplayFirstChdir .message
    ListOptions "-l"


    DenyFilter \*.*/

    # Uncomment this if you are using NIS or LDAP to retrieve passwords:
    #PersistentPasswd off

    # Uncomment this if you would use TLS module:
    #TLSEngine on

    # Uncomment this if you would use quota module:
    #Quotas on

    # Uncomment this if you would use ratio module:
    #Ratios on

    # Port 21 is the standard FTP port.
    Port 21

    # To prevent DoS attacks, set the maximum number of child processes
    # to 30. If you need to allow more than 30 concurrent connections
    # at once, simply increase this value. Note that this ONLY works
    # in standalone mode, in inetd mode you should use an inetd server
    # that allows you to limit maximum number of processes per service
    # (such as xinetd)
     
  3. falko

    falko Super Moderator

    The problem is that /var/www is owned by www-data, but you're logged in a admin. Open /etc/passwd and change admin's homedir from /home/admin to /var/www and run
    Code:
    chown admin /var/www
    and it should work.

    No, not correct. You can install ISPConfig from any directory (e.g. /home/admin, /tmp, etc.) except /root/ispconfig. You can use WinSCP ( http://winscp.net/ ) to upload your copy of ISPConfig to the server.
     
  4. jvilches

    jvilches New Member

    Wrong password?

    Hey Falko, thanks for your help, however...

    I did as you said, modified /etc/passwd and then ran chown admin /var/www

    Now when I try to login to the FTP I get an error message telling me that is the wrong password for admin. I can login with the user admin anymore to the shell. And I tried setting the password again logged in as root, so I ran

    passwd admin, and set a new password for admin, but it is still not working.

    Please help.

    Thanks.

    UPDATE --
    apparently I missed a '/' and that was causing the problem. It's working now and I can upload files via FTP to /www/var

    Thanks a lot for your help.
     
    Last edited: Aug 7, 2006

Share This Page