Blog

pure-ftpd fails to start in a OpenVZ server

Tags: capabilityispCPopenvzpure-ftpdpureftpd

Published on: July 5, 2009 by George K.

pure-ftpd fails to start in a OpenVZ server

Scenario:

In OpenVZ management, we often face the issue that pure-ftpd fails to start in OpenVZ server. Take a look at the issue in detail and see the steps on how to resolve the issue.

Issue : pure-ftpd was not starting in an ispCP enabled VPS server. It was showing failed status in both xinetd and standalone version. ispCP stores the information in MySQL database.

Troubleshooting :

Run the pure-ftpd script using the command itself, and without the sysV startup script.
/usr/sbin/pure-ftpd --daemonize -A -c50 -B -C8 -D -E -fftp -H -I15 -lmysql:/etc/pure-ftpd/pureftpd-mysql.conf -L7500:8 -m4 -s -U133:022 -u500 -i -Oclf:/var/log/pureftpd.log -k99 -Z -4

If it is a failure. Now the turn for strace. Try to install strace by issuing the command,

yum install strace

Error to be noted was below

capset(0x19980330, 0, {CAP_CHOWN|CAP_DAC_READ_SEARCH|CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE|CAP_NET_ADMIN|CAP_SYS_CHROOT|CAP_SYS_NICE, CAP_CHOWN|CAP_DAC_READ_SEARCH|CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE|CAP_NET_ADMIN|CAP_SYS_CHROOT|CAP_SYS_NICE, 0}) = -1 EPERM (Operation not permitted)

followed by a log message in /var/log/messages as
pure-ftpd: (?@?) [ERROR] Unable to switch capabilities : Operation not permitted

Edit the VPS configuration file in the node to add lines below directly as below and then restart the vps from node or PIM or anything you use as the control panel.

CAPABILITY=”CHOWN:on DAC_READ_SEARCH:on SETGID:on SETUID:on NET_BIND_SERVICE:on NET_ADMIN:on SYS_CHROOT:on SYS_NICE:on”

A restart of VPS should fix the error

Category : General, Troubleshooting, VPS

George K.

George K.

George started his career in web hosting and Linux technical support in the year 2004 and is with SupportSages since 2009. He has keen interest in server optimizations, custom security solutions, hacked server recovery, cyber forensic and high availability fail over system design and implementation. George loves long drives and is passionate about art and literature.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items