ftp error and class app.php

Hi i recently installed ehcp on ubuntu 12.10
every time i try to use ftp i get this error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()

i have googled this and tryed loads of methods to fix but nothing seems to be working. any1 else had this or knows how to fix this?

also on the top of the screen in the control panel after i login i get this error msg

Warning: Creating default object from empty value in /var/www/new/ehcp/classapp.php on line 6560

as you see here: http://ehcp.net/?q=node/1257

vsftpd has a bug since ubuntu 12.04, so, do not try to install ehcp(which uses vsftpd) onto ubuntu 12.04 and later.
We and someone are trying to fix this, but not yet solved.

if anybody solves this, let us know.

I think the best thing is to keep 0.32 for 10.04LTS and older, and make a new ehcp version for 12.04+ with pureftp or alike, because we need to have more newer development or the ehcp will be dead.

Can you remove your avatar picture? It shows up on the page and makes it look all messed up.

http://s4.postimage.org/yh6ief5lp/annoying_ehcp_avatar.jpg

~
Thanks
OwN-3m-All
EHCP Force Edition

Place the ftp home directory in a directory which you have removed write permission for. Point to that directory in vsftpd.config

from:
http://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-wri...

Agree with you. development of ehcp will continue with some little pause's. If anybody knows an ftp server, with mysql integration, let me know.
the good side of vsftpd, it has mysql integration directly, that is, it can authenticate users based on mysql tables

There are a lot of bugs still in 0.32 as indicated in the testing thread. I guess the main focus of development is how to fix the VSFTPD problem.

What problems are you running into exactly?

I found these forum posts, but nothing else? VSFTPD should work in ubuntu 12.04+

http://ubuntuforums.org/showthread.php?t=1984925
http://askubuntu.com/questions/128180/vsftpd-stopped-working-after-update

If you could describe to me what is going on, I could give it a whirl. I'm going to setup a test rig that runs ubuntu 12.04 this weekend.

~
Thanks
OwN-3m-All
EHCP Force Edition

Thank you alot for suggestion.
This seems as a solution, as given in links by own3mall,

wget http://http.us.debian.org/debian/pool/main/v/vsftpd/vsftpd_3.0.2-2_amd64.deb
dpkg -i vsftpd_3.0.2-2_amd64.deb
echo "allow_writeable_chroot=YES" >> /etc/vsftpd.conf
service vsftpd reload

I did not test it yet, but I will test&integrate into ehcp in a while.

I'm running Ubuntu 12.04.1 and here's the tested fix that works 100%:

sudo sed -i 's/chroot_local_user=YES/chroot_local_user=NO/g' /etc/vsftpd.conf
sudo service vsftpd restart

~
Thanks
OwN-3m-All
EHCP Force Edition

this is not suggested, because any ftp user can see other files in your system.

Oops, I hadn't noticed that nor tried it. I re-read the links I sent, and I'll see if reverting my changes and setting:

allow_writeable_chroot=YES

will work on my test server.

I'll check more closely to the way security is impacted on my test sever. Thankfully, I am not using this setting on my main web server. Thanks so much for pointing it out. I'll hopefully find another solution that you can incorporate so we can finally put this issue behind us. I'll be testing and playing with it tonight!

~
Thanks
OwN-3m-All
EHCP Force Edition

This worked for me while maintaining security:


sudo add-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get update
sudo apt-get install vsftpd
sudo sed -i 's/chroot_local_user=NO/chroot_local_user=YES/g' /etc/vsftpd.conf
sudo sh -c "echo 'allow_writeable_chroot=YES' >> /etc/vsftpd.conf"
sudo service vsftpd restart

Found information here: http://blog.thefrontiergroup.com.au/2012/10/

You could even use a bash script to check which version of Ubuntu is in use and install the fix for those running version 12.04 or greater. Here's an example:


#!/bin/bash

YEAR="12"
MONTH="04"

version=$(lsb_release -r | awk '{ print $2 }')

yrelease=$( echo "$version" | cut -d. -f1 )
mrelease=$( echo "$version" | cut -d. -f2 )

# for debug
echo "Year: $yrelease"
echo "Month: $mrelease"

if [ "$yrelease" -ge "$YEAR" ]; then
if [ "$mrelease" -ge "$MONTH" ]; then
echo "We're running Ubuntu 12.04 or greater!"
# Run VSFTPD 3.0 Fix
# Described here: http://blog.thefrontiergroup.com.au/2012/10/
sudo add-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get update
sudo apt-get install vsftpd
sudo sed -i 's/chroot_local_user=NO/chroot_local_user=YES/g' /etc/vsftpd.conf
sudo sh -c "echo 'allow_writeable_chroot=YES' >> /etc/vsftpd.conf"
sudo service vsftpd restart
else
echo "We're running an Ubuntu version less than 12.04!"
# Do whatever old versions need to do for vsftpd
fi
else
echo "We're running an Ubuntu version older than 12.x"
# Do whatever old versions need to do for vsftpd
fi

~
Thanks
OwN-3m-All
EHCP Force Edition

I am using pureftpd , its working nice . it implement with mysql

do you sync pureftpd with mysql ? how ? give some link