Virtual Hosting With vsftpd And MySQL On Ubuntu 12.04

Discussion in 'Installation/Configuration' started by gauravrishi, Dec 15, 2012.

  1. gauravrishi

    gauravrishi New Member

    I have configure Virtual Hosting With vsftpd And MySQL On Ubuntu 12.04 and everything is working. Follow all the steps. But when i connect FTP and enter the credentials then i show all the directory of different user. I want that only authoriszed user directory should show. I am not able to connect with FTP if i makr chroot_local_user=NO in /etc/vsftpd.conf other wise i show the error

    Response: 220 (vsFTPd 2.3.5)
    Command: USER testuser
    Response: 331 Please specify the password.
    Command: PASS ******
    Response: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
    Error: Critical error
    Error: Could not connect to server
     
  2. Landi20

    Landi20 New Member

    its saying that user dont exist in chroot file
    see if add that user to chroot file
     
  3. gauravrishi

    gauravrishi New Member

    reply

    where do i need to create that file. Please explain
     
  4. Landi20

    Landi20 New Member

    yes
    in /etc/vsftpd.chroot_list
     
  5. gauravrishi

    gauravrishi New Member

    Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 12.10

    I have follow all the step given under this Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 12.10) and was sucessfully done all step but i am getting this error while restarting postfix
    /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message="The user you are trying to reach is over quota."
    /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
    /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_mailbox_limit_override=yes
    /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_overquota_bounce=yes
    /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_limit_message="The user you are trying to reach is over quota."
    /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes


    and also not able to login into webmail getting ERROR:
    ERROR: Connection dropped by IMAP server.
    . I have checked that all service are running fine but there is no maildir under /home/vmail/

    Kindly help me in this
     
  6. Landi20

    Landi20 New Member

    the other problem with ftp is solve your not
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Looks like you didn't compile Postfix with the quota patch.
     
  8. gauravrishi

    gauravrishi New Member

    reply

    Hi, problem of ftp not resolved. I have created file and the user testuser and getting the same problem. However for postfix i have already updated the postfix patches. When i was shoting this command dpkg -i postfix_2.9.3-2ubuntu2_amd64.deb postfix-mysql_2.9.3-2ubuntu2_amd64.deb its was giving error..

    root@mail:/home/gaurav# cat /etc/issue.net
    Ubuntu 12.04.1 LTS
    root@mail:/home/gaurav# dpkg -i postfix_2.9.3-2ubuntu2_amd64.deb postfix-mysql_2.9.3-2ubuntu2_amd64.deb
    dpkg: error processing postfix_2.9.3-2ubuntu2_amd64.deb (--install):
    cannot access archive: No such file or directory
    dpkg: error processing postfix-mysql_2.9.3-2ubuntu2_amd64.deb (--install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    postfix_2.9.3-2ubuntu2_amd64.deb
    postfix-mysql_2.9.3-2ubuntu2_amd64.deb
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Please check with
    Code:
    ls -l
    that you use the correct filenames. Filenames might be different, or you might be in the wrong directory.
     
  10. gauravrishi

    gauravrishi New Member

    reply

    I have crosschecked all the code and everything. i am following same step as given by your site. Please check the error which i was getting

    root@mail:/usr/src/postfix-2.9.3# patch -p1 < ../postfix-vda-v11-2.9.1.patch
    patching file README_FILES/VDA_README
    patching file src/global/mail_params.h
    patching file src/util/file_limit.c
    patching file src/virtual/mailbox.c
    patching file src/virtual/maildir.c
    patching file src/virtual/virtual.c
    patching file src/virtual/virtual.h
    root@mail:/usr/src/postfix-2.9.3#



    root@mail:/usr/src/postfix-2.9.3# dpkg-buildpackage

    dpkg-genchanges >../postfix_2.9.3-2~12.04.4_i386.changes
    dpkg-genchanges: not including original source code in upload
    dpkg-source --after-build postfix-2.9.3
    dpkg-buildpackage: binary and diff upload (original source NOT included)

    root@mail:/usr/src# ls -l
    total 6876
    drwxr-xr-x 18 root root 4096 Dec 15 09:58 postfix-2.9.3
    -rw-r--r-- 1 root root 234767 Dec 15 09:54 postfix_2.9.3-2~12.04.4.diff.gz
    -rw-r--r-- 1 root root 1524 Dec 15 09:54 postfix_2.9.3-2~12.04.4.dsc
    -rw-r--r-- 1 root root 3806 Dec 15 09:59 postfix_2.9.3-2~12.04.4_i386.changes
    -rw-r--r-- 1 root root 1471888 Dec 15 09:59 postfix_2.9.3-2~12.04.4_i386.deb
    -rw-r--r-- 1 root root 3760555 May 30 2012 postfix_2.9.3.orig.tar.gz
    -rw-r--r-- 1 root root 46232 Dec 15 09:59 postfix-cdb_2.9.3-2~12.04.4_i386.deb
    -rw-r--r-- 1 root root 159072 Dec 15 09:59 postfix-dev_2.9.3-2~12.04.4_all.deb
    -rw-r--r-- 1 root root 1080564 Dec 15 09:59 postfix-doc_2.9.3-2~12.04.4_all.deb
    -rw-r--r-- 1 root root 54400 Dec 15 09:59 postfix-ldap_2.9.3-2~12.04.4_i386.deb
    -rw-r--r-- 1 root root 48032 Dec 15 09:59 postfix-mysql_2.9.3-2~12.04.4_i386.deb
    -rw-r--r-- 1 root root 48222 Dec 15 09:59 postfix-pcre_2.9.3-2~12.04.4_i386.deb
    -rw-r--r-- 1 root root 48256 Dec 15 09:59 postfix-pgsql_2.9.3-2~12.04.4_i386.deb
    -rw-r--r-- 1 root root 55009 Apr 11 2012 postfix-vda-v11-2.9.1.patch
    root@mail:/usr/src# dpkg -i postfix_2.9.3-2ubuntu2_amd64.deb postfix-mysql_2.9.3-2ubuntu2_amd64.deb
    dpkg: error processing postfix_2.9.3-2ubuntu2_amd64.deb (--install):
    cannot access archive: No such file or directory
    dpkg: error processing postfix-mysql_2.9.3-2ubuntu2_amd64.deb (--install):
    cannot access archive: No such file or directory
    Errors were encountered while processing:
    postfix_2.9.3-2ubuntu2_amd64.deb
    postfix-mysql_2.9.3-2ubuntu2_amd64.deb
     
  11. falko

    falko Super Moderator Howtoforge Staff

    You must run
    Code:
    dpkg -i postfix_2.9.3-2~12.04.4_i386.deb postfix-mysql_2.9.3-2~12.04.4_i386.deb
     
  12. user2012

    user2012 New Member

    Problem with vsftpd

    estimates, add user vsftpd.chroot_list file but I can not access the ftp server. message appears: 331 Please specify the password.

    thank you very much for your help
     
  13. Phonetic

    Phonetic New Member

    500 OOPS: vsftpd: refusing to run with writable root inside chroot()

    I followed this guide to get VSFTPD setup on an Ubuntu 12.04 server:
    http://www.howtoforge.com/virtual-hosting-with-vsftpd-and-mysql-on-ubuntu-12.04

    I ran into a problem that many others are also running into. To get the error above "500 OOPS: vsftpd: refusing to run with writable root inside chroot()" fixed, here is what needs to be done:

    Courtesy of Mark Hale from The Frontier Group:
    reference: http://www.benscobie.com/fixing-500...ith-writable-root-inside-chroot/#comment-4048

    After doing the above, I then added this to my vsftpd config (/etc/vsftpd.conf):
    Code:
    allow_writeable_chroot=YES
    Then I restarted the vsftpd service:
    Code:
    service vsftpd restart
    And that fixed the error for me.

    It seems like this should be added to the guide. The guide is great, but after following it exactly as it's written, I ran into the error above on Ubuntu 12.04. I haven't tried the guide on a different version of Ubuntu server so it may work just fine for some, but for 12.04, this was the missing step that solved my problem.
     
  14. lazant

    lazant New Member

    Fixing Error: OOPS: vsftpd: refusing to run with writable root inside chroot()

    Followed the tutorial here to set up vsftpd on Ubuntu Server 12.0.4.2 and got the "OOPS: vsftpd: refusing to run with writable root inside chroot()" error. Followed these steps to remedy:
    1. Add
    Code:
    chroot_list_enable=yes
    chroot_list_file=/etc/vsftpd.chroot_list
    to /etc/vsftpd.conf

    2. Create a list of usernames
    Code:
    [I]username1[/I]
    [I]username2[/I]
    ...
    in /etc/vsftpd.chroot_list

    3. Restart vsftpd
    Code:
    sudo service vsftpd restart
    Hope this helps anyone else having the same issue.
     

Share This Page