Showing results for 
Search instead for 
Did you mean: 
Create Post

Feature Request - running Serv-U FTP as non-root on Linux

Feature Request - running Serv-U FTP as non-root on Linux

(This is a feature request related to case 480573)

On Centos 6, we are running Serv-U and Serv-U-Gateway as a non-root user (_servu). This appears to be working fine, but we would prefer that Serv-U explicitly support this configuration.

In order to bind privileged ports (<1024), the Serv-U process must either run at least briefly as root, or have appropriate cap_net_bind_service capabilities set.

We are using a modified init script that uses the 'setcap' command to allow the process to bind privileged ports. Our modified 'start' section of the init script is:

    "$SERVERPATH/$SERVERNAME" -isrunning

    if [ $? -eq 1 ];


        echo "Serv-U is already running"


        echo "Serv-U is starting..."

        /bin/chmod 740 "$SERVERPATH/$SERVERNAME"

        /usr/sbin/setcap 'cap_net_bind_service=+ep' "$SERVERPATH/$SERVERNAME"

        /bin/su -l -s /bin/sh _servu -c "(cd \"$SERVERPATH\" && ./$SERVERNAME -startservice & 1>/dev/null 2>&1)"

        sleep 1

        "$0" status


I have attached our full init scripts.

Tags (3)
Level 15

Unfortunately this might not be possible in future due to technical requirements of frameworks we are using.

Community Manager
Community Manager
Status changed to: Closed