🔒 Repository is read-only – file editing is disabled.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
pkgname: vsftpd
pkgver: '3.0.5'
pkgrel: '5'
pkgdesc: Contains a very secure and very small FTP daemon.
url: 'https://security.appspot.com/vsftpd.html'
arch: x86_64
depends:
- pam
- shadow
makedepends:
- libnsl
- libcap
source:
- 'https://repo.paganlinux.eu/sources/pagan-scripts-20260822.tar.gz'
- 'https://security.appspot.com/downloads/${pkgname}-${pkgver}.tar.gz'
sha256sums:
- 32e0aec88cc56a8afe0b2671debe47d19357792a6ffaffaf6e3db8a021a57072
- SKIP
hooks:
post-install: |
name=vsftpd
version=3.0.5
release=5
INFO="\033[1;36m"
NORMAL="\033[0;39m"
if [ ! -f etc/vsftpd.conf ]; then
cp etc/vsftpd.conf{.example,}
printf "${INFO} /etc/vsftpd.conf created ${NORMAL}\n"
printf "${INFO} Double check /etc/vsftpd.conf and adapted to your needs ${NORMAL}\n"
fi
pre-install: "name=vsftpd\nversion=3.0.5\nrelease=5\nINFO=\"\\033[1;36m\"\nNORMAL=\"\\033[0;39m\"\nSN1=\"vsftpd\"\nIDN1=\"\
47\"\nSN2=\"ftp\"\nIDN2=\"45\"\n\nif ! (getent group $SN1 > /dev/null); then\n\tprintf \"${INFO}Creating $SN1 group${NORMAL}\\\
n\"\n\tgroupadd -g $IDN1 $SN1\nfi\nif ! (getent group $SN2 > /dev/null); then\n\tprintf \"${INFO}Creating $SN2 group${NORMAL}\\\
n\"\n\tgroupadd -g $IDN2 $SN2\nfi\n\nif ! (getent passwd $SN1 > /dev/null); then\n\tprintf \"${INFO}Creating $SN1 user${NORMAL}\\\
n\"\n\tuseradd -c \"vsftpd User\" -d /dev/null -g $SN1 \\\n -s /usr/bin/false -u $IDN1 $SN1\nfi\nif ! (getent passwd\
\ $SN2 > /dev/null); then\n\tprintf \"${INFO}Creating $SN2 user${NORMAL}\\n\"\n\tuseradd -c \"anonymous_user\" -d /home/ftp\
\ -g $SN2 \\\n -s /usr/bin/false -u $IDN2 $SN2\nfi\n"
build: "mkdir -p ${PKGDIR}/{etc/pam.d,home,usr/{bin,share/{vsftpd,man/man{5,8}}}}\ninstall -v -d -m 0755 ${PKGDIR}/usr/share/vsftpd/empty\n\
install -v -d -m 0755 ${PKGDIR}/home/ftp\n\nSN1=\"vsftpd\"\nIDN1=\"47\"\nSN2=\"ftp\"\nIDN2=\"45\"\n\nif ! (getent group\
\ $SN1 > /dev/null); then\n\tgroupadd -g $IDN1 $SN1\nfi\nif ! (getent group $SN2 > /dev/null); then\n\tgroupadd -g $IDN2\
\ $SN2\nfi\n\nif ! (getent passwd $SN1 > /dev/null); then\n\tuseradd -c \"vsftpd User\" -d /dev/null -g $SN1 \\\n \
\ -s /usr/bin/false -u $IDN1 $SN1\nfi\nif ! (getent passwd $SN2 > /dev/null); then\n\tuseradd -c \"anonymous_user\" -d\
\ /home/ftp -g $SN2 \\\n -s /usr/bin/false -u $IDN2 $SN2\nfi\ncd ${pkgname}-${pkgver}\n\nsed -e \"s/kVSFSysStrOpenUnknown;/(enum\
\ EVSFSysUtilOpenMode)&/\" -i sysstr.c\n\nmake\n"
package: |
cd ${pkgname}-${pkgver}
install -v -m 755 vsftpd ${PKGDIR}/usr/bin/vsftpd
install -v -m 644 vsftpd.8 ${PKGDIR}/usr/share/man/man8
install -v -m 644 vsftpd.conf.5 ${PKGDIR}/usr/share/man/man5
install -v -m 644 vsftpd.conf ${PKGDIR}/etc/vsftpd.conf.example
cat >> ${PKGDIR}/etc/vsftpd.conf.example << "EOF"
#
# It is now recommended to run vsftpd in standalone mode.
# Also, you should specify the privilege separation user created above.
# Finally, you should specify the chroot directory.
# man vsftpd.conf will give you all the details.
background=YES
listen=YES
nopriv_user=vsftpd
secure_chroot_dir=/usr/share/vsftpd/empty
# vsftpd daemon uses seccomp to improve security by default.
# But it's known to cause vsftpd unable to handle ftp LIST
# command with recent kernel versions.
seccomp_sandbox=NO
# To enable local logins
local_enable=YES
# PAM session support
session_support=YES
pam_service_name=vsftpd
EOF
cat > ${PKGDIR}/etc/pam.d/vsftpd << "EOF"
# Begin /etc/pam.d/vsftpd
auth required /lib/security/pam_listfile.so item=user sense=deny \
file=/etc/ftpusers \
onerr=succeed
auth required pam_shells.so
auth include system-auth
account include system-account
session include system-session
EOF
cat >> /etc/vsftpd.conf << "EOF"
session_support=YES
pam_service_name=vsftpd
EOF
# Service
cd ${SRCDIR}/pagan-scripts-20260822
make DESTDIR=${PKGDIR} install-sysd-vsftpd