⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.212
Server IP:
65.21.180.239
Server:
Linux gowhm.eplangoweb.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.0.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
1305819
/
root
/
var
/
lib
/
dpkg
/
info
/
View File Name :
cpanel-phpmyadmin.preinst
#!/bin/sh set -e ## <asset scriplets/pre> set -e USER=cpanelphpmyadmin GROUP=$USER CPMA=/var/cpanel/userhomes/cpanelphpmyadmin PREFIX_BASE=/usr/local/cpanel/base/3rdparty PREFIX=${PREFIX_BASE}/phpMyAdmin checkPerms() { echo "check $USER user and directories permissions" # add group /usr/bin/getent group $GROUP >/dev/null || /usr/sbin/groupadd -r $GROUP # add user if needed /usr/bin/getent passwd $USER >/dev/null || \ /usr/sbin/useradd -r -g $GROUP -M -d /var/cpanel/userhomes/$USER \ -s /usr/local/cpanel/bin/noshell \ -c "phpMyAdmin for cPanel & WHM" $USER # ensure directories, perms & ownership #` required for Ubuntu, not necessary for CentOS /bin/mkdir -p $CPMA chmod 711 $CPMA chown $GROUP:$USER $CPMA /bin/mkdir -p $CPMA/cache chmod 700 $CPMA/cache chown $GROUP:$USER $CPMA/cache /bin/mkdir -p $CPMA/mail chmod 711 $CPMA/mail chown $GROUP:$USER $CPMA/mail /bin/mkdir -p $CPMA/sessions chmod 700 $CPMA/sessions chown $GROUP:$USER $CPMA/sessions /bin/mkdir -p $CPMA/tmp chmod 700 $CPMA/tmp chown $GROUP:$USER $CPMA/tmp } runPre_cleanup() { echo "cleaning up old phpmyadmin before installing new one." echo "We only do this the first time we install the cpanel-phpmyadmin package" if [ -f ${PREFIX}/config.sample.inc.php ] ; then cp -f ${PREFIX}/config.sample.inc.php ${PREFIX_BASE} fi if [ -f ${PREFIX}/config.inc.php ] ; then cp -f ${PREFIX}/config.inc.php ${PREFIX_BASE} fi /bin/rm -rf ${PREFIX} ||: mkdir -p ${PREFIX} if [ -f ${PREFIX_BASE}/config.sample.inc.php ] ; then mv -f ${PREFIX_BASE}/config.sample.inc.php ${PREFIX}/ fi if [ -f ${PREFIX_BASE}/config.inc.php ] ; then mv -f ${PREFIX_BASE}/config.inc.php ${PREFIX}/ fi } # main entrance runPre_install() { runPre_cleanup; checkPerms; } runPre_upgrade() { checkPerms; } ## </asset> case "$1" in install) runPre_install; ;; upgrade) runPre_upgrade; ;; esac exit 0