Problems trying to build SFTP for ProFTP with CB2

darkus

Verified User
Joined
Dec 15, 2005
Messages
114
So using the following guide ( http://help.directadmin.com/item.php?id=439 ), i'm trying to enable SFTP.

However, when I get to the step ./build proftpd I get kicked out with the following error:
Please set a correct PHP mode (mode set for php1 and/or php2 should be mod-php, mod_php or suphp).

I have my php1 set to CGI right now and not interested in mod-php.

Anyway around this?
 

simba

Verified User
Joined
Oct 13, 2012
Messages
48
Hello,

Probably i would be little help to you, but i did not need to configure anything.
I am running pureFTPD though.

Just make sure the account has SSH access enabled (at admin, reseller and user level).
Then try to connect.

I am not sure if you must have generated SSL sertificate first, but i would recommend doing that first.

AAnd after that try connecting, by default would be 22, if you haven't changed it or firewall blocking it.

Good luck.
 

simba

Verified User
Joined
Oct 13, 2012
Messages
48
And about building, just read custombuild's FAQ, all information is there.

P.S.

Could somebody confirm me?

P.P.S

What is the damn answer for this:

one three five seven

It's supposed to be nine ...
 

darkus

Verified User
Joined
Dec 15, 2005
Messages
114
Ok it seems like options.conf was changed in the last few days, I used to be able to use the words cli or cgi for the PHP type, but now you have to type in 'mod_php' or 'php-fpm'. Problem solved :)

But new issue, now I get this:
You cannot install ProFTPD, because you do not have it set in options.conf file.

This is my options.conf file:
#PHP settings.
Default version of PHP is always php1_release. Possible values for php1/php2_release: 5.3, 5.4, no. php1/php2_mode: cli, cgi (mod_php or php-fpm)
php1_release=5.4
php2_release=no
php1_mode=mod_php
php2_mode=php-fpm
php_ini=no
#Possible values - production or development
php_ini_type=production
ioncube=no
zend=no

#Possible values - 5.1, 5.5
mysql=5.5
mysql_inst=no
mysql_backup=yes
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups

#Possible value: 2.4
apache_ver=2.4
mod_ruid2=no
secure_htaccess=no
harden-symlinks-patch=yes

#Web applications
phpmyadmin=yes
squirrelmail=yes
roundcube=yes

#Mail options
exim=no
eximconf=no
clamav=no
spamassassin=no
dovecot=yes

#Statistics
awstats=no
webalizer=yes

#FTP options
proftpd=yes
pureftpd=no

#Jailed shell
jail=no

#Autoconf/automake/libtool options
autoconf=yes
automake=yes
libtool=yes
curl=yes

#new version of zlib and libxml2 (experts only)
zlib=no
new_zlib=no
new_xml2=yes

#Custombuild options
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=no
clean_old_tarballs=no
clean_old_webapps=yes
downloadserver=files.directadmin.com

#Cron settings
cron=no
cron_frequency=daily
email=email@domain.com
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#Cloudlinux settings
cloudlinux=no
ftpd=pureftpd
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
Hello,

Hmm, I see that you've already got:

Code:
proftpd=yes
but please double check it... and probably you need to change

Code:
ftpd=pureftpd
to proftpd
 

darkus

Verified User
Joined
Dec 15, 2005
Messages
114
Ok I completely cleared my CB and am using the new format of CB2 options.conf and now Proftpd builds just fine! However SFTP still doesnt work for custom accounts made in the user level of the control panel. Not that this is a CB issue, but maybee someone has ideas?
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
You should connect to the port on which ProFTPd is listening. SSHd daemon (ie. OpenSSH) does not know anything about your additional FTP accounts. And ProFTPd by default is not using PAM.

In the guide it is said to use 23 port (as the guide suppose to set ProFTPd to listen to 23 TCP), or:

Note, the default for sftp clients is to use port 22. However, sshd uses this port by default.
If you want sftp to use 22, you'd first need to change the port that sshd is using (ensure your firewall is open on the new port), then change the Port 23 value in the /etc/proftpd.sftp.conf file to use 22 instead, then restart proftpd.
use 22 port, if you changed in /etc/proftpd.conf
 
Top