Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create a new FTP-user in a domain
#1
Hi,


1. I created a domain, let's say "domain.com".
2. I have FTP-user "domain"
3. I want to add a new FTP-user, who would have access to "vhosts/domain.com/httpdocs/" 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?

Restored from old drupal forum, for user uid:2654 username:Altzgamer
You may reset your password to access your new account here.
Reply
#2
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 http://www.ehcp.net/?q=node/120

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


Restored from old drupal forum, for user uid:2654 username:Altzgamer
You may reset your password to access your new account here.
Reply
#3
Thank you for your help.

1. I did as you said. I created a user. Domainname: domain.com. I'm not sure what to write in the homedir. Should it be the absolute path like /var/www/vhosts/domain.com/httpdocs/ ? 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).


Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#4
Write absolute path there: /var/www/vhosts/domain.com/httpdocs/
then,
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/domain.com/httpdocs/
chown vsftpd /var/www/vhosts/domain.com/httpdocs/

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.



Restored from old drupal forum, for user uid:2654 username:Altzgamer
You may reset your password to access your new account here.
Reply
#5
Thank you!!! Your advice worked perfectly. Everything is fine now! See you!

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#6
newer version of ehcp, 0.29.10, is coming and will have most of these things automatic.

Restored from old drupal forum, for user uid:2654 username:Altzgamer
You may reset your password to access your new account here.
Reply
#7
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?

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#8
please make apply debug techniques described in http://ehcp.net/?q=node/771
and make sure that your ehcp daemon running.
while debugging, ehcp gui->options->sync domains

look in logs in debug windows (consoles)

Restored from old drupal forum, for user uid:2968 username:djanym
You may reset your password to access your new account here.
Reply
#9
This is what I have:
This is what I have:
ehcp 0.29.12- Daemon loop number:18468
-----------daemon suspended for 10 sec ---------pwdSad/var/www/vhosts/ehcp)
Array
(
[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?

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#10
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:

<li> did you run your ehcp daemon as root? to be sure, log into your console, run: "sudo /etc/init.d/ehcp restart"

<li> 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)

<li> retry ftp add, while debuging your system, if same problem, repeat step 1, then, retry. let me know the result.

Restored from old drupal forum, for user uid:2968 username:djanym
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping