403Webshell
Server IP : 159.253.20.91  /  Your IP : 216.73.216.111
Web Server : nginx/1.20.2
System : Linux se38c9e53.fastvps-server.com 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64
User : pr11_ru_usr ( 1041)
PHP Version : 8.1.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/proftpd-core/sample-configurations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/proftpd-core/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