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