0

I have a bitbucket pipeline where I need to test an FTP client.

I have already tested it on a Docker image and everything works fine. However on the pipeline with the same instructions I get a segmentation fault.

image: node:7.6.0

pipelines:
  default:
    - step:
        script:
          - export DEBIAN_FRONTEND=noninteractive
          - apt-get update && apt-get install -y libelf1 proftpd
          - mkdir -p /etc/vsftpd /var/www /var/run/vsftpd/empty
          - cp ftp/launch /launch
          - sed -ie "s/# DefaultRoot.*/DefaultRoot \/ftp/" /etc/proftpd/proftpd.conf
          - cat /etc/proftpd/proftpd.conf
          - proftpd --configtest
          - proftpd -vv
          - mv testFiles/input.json .
          - mv testFiles/ /ftp
          - npm install
          - ./test.sh

On the test file before the actual testing, I spawn a proftpd process on background

#!/bin/bash -ex

useradd --shell /bin/sh --create-home --password "$(perl -e 'print crypt($ARGV[0], "password")' ${PASSWORD})" ${USERNAME}
chown -R ${USERNAME}:${USERNAME} /ftp
exec proftpd --nodaemon -nd10

Even with the debug with level 10 all I get is

+ exec proftpd --nodaemon -nd10
./test.sh: line 11:   241 Segmentation fault      (core dumped) USERNAME=${USERNAME} PASSWORD=${PASSWORD} /launch
  • What if you omit the `exec`, and do just `proftpd --nodaemon -nd10`, in your shell script? – Castaglia Feb 28 '17 at 21:15
  • @Castaglia thanks for the tip, but didn't work, the result is exactly the same. – Maurizio Carboni Mar 01 '17 at 11:09
  • I think that I'll need to reproduce this locally; please contact me via email (I'm the ProFTPD author/maintainer) to see if we can track this down. SO here won't be the best place for that; we'll post the results once found. – Castaglia Mar 19 '17 at 03:26

0 Answers0