How to create a new FTP-user in a domain


1. I created a domain, let's say "".
2. I have FTP-user "domain"
3. I want to add a new FTP-user, who would have access to "vhosts/" directory
4. In a control panel I'm adding an FTP-user, but i can't point that this particular FTP-user can have access to the needed directory.
5. I tried to change it in the ehcp-Mysql database but it still can't point me to the needed directory.

How can I change that?

as of ver 0.29.09 there is no autmatic , gui way of doing this.

You may do it by :
1- insert a new row into ftpaccounts table, setting homedir field.
set it to whatever you want in ehcp db, ftpaccounts table,
2- then go to ehcp gui, add a new arbitrary ftp user, then delete it (this synchronizes ehcp db to system, since the ftp user has non standard home dir)
(i will make this automatic or more easy in future ehcp versions..)

it should work, i may help you further if you need.

this is also discussed in

Any directory you defined there should be accessible by vsftpd user of system, to do that,
chown vsftpd yourdir
in your console

Thank you for your help.

1. I did as you said. I created a user. Domainname: I'm not sure what to write in the homedir. Should it be the absolute path like /var/www/vhosts/ ? or just /httpdocs/ ?
2. I tried those 2 options and I tried leaving it blank as well. Whatever I do, Filezilla tells me:

500 OOPS: cannot change directory:httpdocs
500 OOPS: child died

(even if it's blank).

Write absolute path there: /var/www/vhosts/
did you do the 2nd step ? (then go to ehcp gui, add a new arbitrary ftp user, then delete it)
it is necessarry to do that as of version 0.29.09 (i will improve that in future)

alternatively, after doing all, (before trying in filezilla) try in console:
mkdir /var/www/vhosts/
chown vsftpd /var/www/vhosts/

And let me know at which stat it worked or not worked..

Note that, you try to do an un-supported feature of current ehcp version. So, these are some manual operations, in fact conflicts with "easy" philosophy of ehcp. Thats why you deal a bit...

See you.

Thank you!!! Your advice worked perfectly. Everything is fine now! See you!

newer version of ehcp, 0.29.10, is coming and will have most of these things automatic.

I have the same thing.... and it's very strange, because it was working, but for now it's throwing me error "500 OOPS: cannot change directory" for any new created ftp account.
I was trying step 1 and 2.. and no success...
Also I have other permissions errors... for example can't create custom http... In logs i see some permissions error... Can you help me with it?

please make apply debug techniques described in
and make sure that your ehcp daemon running.
while debugging, ehcp gui->options->sync domains

look in logs in debug windows (consoles)

This is what I have:
This is what I have:
ehcp 0.29.12- Daemon loop number:18468
-----------daemon suspended for 10 sec ---------pwd:(/var/www/vhosts/ehcp)
[0] => Array
[id] => 155
[host] =>
[op] => daemonftp
[status] =>
[tarih] => 0000-00-00 00:00:00
[try] => 0
[info] => /var/www/vhosts/localuser/q
[info2] =>
[action] => add

(runop2) op:daemonftp, action:add, info:/var/www/vhosts/localuser/q, info2:

executing command: mkdir -p /var/www/vhosts/localuser/q
(escapedcmd: mkdir -p /var/www/vhosts/localuser/q)
mkdir: cannot create directory `/var/www/vhosts/localuser/q': Permission denied

executing command: chown vsftpd:www-data -Rf /var/www/vhosts/localuser/q
(escapedcmd: chown vsftpd:www-data -Rf /var/www/vhosts/localuser/q)

I'm trying to create an ftp user... I have many such errors... Any suggestion?

those logs shows what your errors are, and obviously, your ehcp daemon(background process that does almost everything) has not enaugh permissions. to fix, try:

  • did you run your ehcp daemon as root? to be sure, log into your console, run: "sudo /etc/init.d/ehcp restart"
  • you may be running a security software, such as selinux or apparmor, which prevent ehcp from doing necesarry things. you may need to stop them: in console: /etc/init.d/apparmor stop . if that does not help, search for selinux help, and disable it (I also dont remember)
  • retry ftp add, while debuging your system, if same problem, repeat step 1, then, retry. let me know the result.
  • Great! After restarting ehcp it is working fine now. Djazaka-Llahu hair, kardeşim. ;)

    Update disk quota: | /var/www/vhosts/mydom/mydom.comdu: cannot read directory `/var/www/vhosts/localuser/': Permission denied
    du: cannot read directory `/var/www/vhosts/localuser/': Permission denied
    du: cannot read directory `/var/www/vhosts/localuser/': Permission denied