Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Ubuntu 9.10

Discussion in 'HOWTO-Related Questions' started by huey23, May 10, 2010.

  1. huey23

    huey23 New Member

    I used this tutorial located here: http://www.howtoforge.com/virtual-hosting-with-proftpd-and-mysql-ubuntu-9.10

    The instructions were great and it works almost flawlessly. After completing the tutorial, I tried uploading using the username and password I created. The error message was:

    The uploaded file could not be moved to /location/of/dir/

    The permissions on the directory when created are:

    drwx--x--x 4 ftpuser ftpgroup

    This is a WordPress site with the default file structure. I have read the page here but I was wondering if this is a natural occurrence from a misconfiguration of my hosting box or if it is a WordPress issue.

    Is this an upload error or file permissions? I have a great feeling this is file permissions on the WP side, but what are good permissions on customer FTP directories and how would I have those perms applied as default when the user is created through MySQL?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you try
    Code:
    chmod 755 /location/of/dir/
    ?
     
  3. huey23

    huey23 New Member

    Falko,

    Great work in this tut...

    That works along with chmod +x /location/of/dir/

    Although, how would I make that the default perms for that directory when it is created (after logging in to ftp).
     
  4. falko

    falko Super Moderator ISPConfig Developer

    You should use a umask of 022 in your ProFTPd configuration.
     
  5. huey23

    huey23 New Member

    Here are my proftpd.conf settings for umask:

    # Umask 022 is a good standard umask to prevent new files and dirs
    # (second parm) from being group and world writable.
    Umask 022 022
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Looks ok. Are new directories still being created with the wrong permissions?
     
  7. huey23

    huey23 New Member

    Yes, these are the default umask settings...I did not change them.

    I tried to understand the umask settings as I was reading but I was a little lost.

    I will create another user and I will post my results.
     
  8. huey23

    huey23 New Member

    Here are the results of the new user being added:

    drwx------ 2 ftpuser ftpgroup 4096 2010-05-27 11:48 www.testing123.com

    I created a couple of simple php pages to do the user adding for me. I have the SQL queries in the php. I was thinking I can just change to the newly created dir and "chmod +x" that dir at the end of the script but I cannot do that because the dir is not created until they login through FTP. Are there any other suggestions to make the default perms on the new dirs when they are created?

    Thanks!!
     
  9. rgunawans

    rgunawans New Member

    Some configuration won't work

    I've 2 question regarding this tutorial:
    1. I've create new user in mysql table, let say user1, when I'm try to login using Filezilla, it said that there's no such user. Then I'm create usre1 in linux system, and try to login, it said succeded. That user can upload and download. Is there something wrong with my configuration? I've follow this tutorial twice.. I'm using Ubuntu 10.04, is that cause this error?
    2. Is it possible to block update for user1, and give access to admin_user1 for download and upload to the server?
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Are you sure you have ProFTPd running and not some other FTP server? What's the output of
    Code:
    netstat -tap
    ?
     
  11. rgunawans

    rgunawans New Member

    here is the result :
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Can you post your proftpd.conf?
     
  13. rgunawans

    rgunawans New Member

    this is my proftpd.conf..

     
  14. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/proftpd/sql.conf?
     
  15. rgunawans

    rgunawans New Member

    here is my /etc/proftpd/sql.conf
     
  16. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/proftpd/modules.conf?
     
  17. rgunawans

    rgunawans New Member

    this is my modules.conf
     
  18. falko

    falko Super Moderator ISPConfig Developer

    Hm, everything's looking ok... :confused:
     
  19. rgunawans

    rgunawans New Member

    I'm using Ubuntu 10.04, is that the problem? since your tutorial using Ubuntu 9.10, maybe the library different version?
     
  20. falko

    falko Super Moderator ISPConfig Developer

    Maybe - I haven't tried this on 10.04 yet.
     

Share This Page