403Webshell
Server IP : 172.67.131.151  /  Your IP : 172.71.81.82
Web Server : Apache
System : Linux keen-cori.18-142-40-148.plesk.page 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64
User : simottodesign.com_2tntp341vs7 ( 10011)
PHP Version : 8.3.31
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/psa-proftpd/sample-configurations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/psa-proftpd/sample-configurations/PFTEST.install
#!/bin/sh
#
# PFTEST.install - setup files for an unprivileged proftpd test
#

PFTESTDIR=/tmp/PFTEST
SRCDIR=./sample-configurations

FILELIST="PFTEST.passwd PFTEST.group PFTEST.conf.in"

PATH=/usr/bin:/bin
export PATH
umask 022


#
# Preconditions
#
if [ ! -d ${SRCDIR} ] || [ ! -r ${SRCDIR} ]; then
	echo "Error: \"${SRCDIR}\" not found." >&2
	exit 2
fi

for file in ${FILELIST} ; do
	if [ ! -r ${SRCDIR}/${file} ]; then
		echo "Error: \"${SRCDIR}/${file}\" not found." >&2
		exit 2
	fi
done

if [ -d ${PFTESTDIR} ] || [ -f ${PFTESTDIR} ] || [ -h ${PFTESTDIR} ] \
	|| [ -b ${PFTESTDIR} ] || [ -c ${PFTESTDIR} ] || [ -p ${PFTESTDIR} ]
then
	echo "Error: \"${PFTESTDIR}\" already exists." >&2
	exit 2
fi


#
# Determine current user and group names
#
if [ -x /usr/xpg4/bin/id ] && /usr/xpg4/bin/id -un >/dev/null 2>&1 ; then
	USERNAME=`/usr/xpg4/bin/id -un`
	GROUPNAME=`/usr/xpg4/bin/id -gn`
elif type id >/dev/null && id -un >/dev/null 2>&1 ; then
	USERNAME=`id -un`
	GROUPNAME=`id -gn`
else
	# Could try harder...
	echo "Error: can not determine user and group names." >&2
	exit 3
fi


#
# Install the files
#
mkdir ${PFTESTDIR} || {
	echo "Error: mkdir failed." >&2
	exit 4
}

chmod 755 ${PFTESTDIR} || {
	echo "Error: chmod failed." >&2
	exit 4
}

cp -p ${SRCDIR}/PFTEST.passwd ${PFTESTDIR} \
&& cp -p ${SRCDIR}/PFTEST.group ${PFTESTDIR} \
&& sed -e "s/%User%/${USERNAME}/" \
	-e "s/%Group%/${GROUPNAME}/" \
	-e "s|%TestDir%|${PFTESTDIR}|" \
	${SRCDIR}/PFTEST.conf.in > ${PFTESTDIR}/PFTEST.conf

if [ $? -ne 0 ]; then
	echo "Error: installation failed." >&2
	exit 5
fi

echo "Sample test files successfully installed in ${PFTESTDIR}."

exit 0


Youez - 2016 - github.com/yon3zu
LinuXploit