FrontPage Extension in cPanel is consider deprecated and there are many security holes reported in this. Microsoft has discontinued FrontPage extension support for the Unix platform since end of 2006. It is good thing to remove this extension which sometimes being installed without your acknowledgement.

You can use many way to remove FrontPage extension, since cPanel already have built-in scripts to remove FrontPage extension which is /scripts/unsetupfp4. Following BASH script has been tested in cPanel 11.28.93 running on CentOS 5.5. It will detect users from /var/cpanel/users directory and try to search for vti directory, if found, the cPanel’s FrontPage uninstaller will execute the domain name found in .htaccess.

Lets do this. Firstly, create a new file by using text editor which, I will use nano:

[root@cpanel ~]# nano /root/removefp

2. Copy and paste following scripts:

#!/bin/bash
# Remove Frontpage Extension for all accounts in cPanel server
 
USERDIR='/var/cpanel/users'
 
read -p "Are you sure you remove FP extension for all domains? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
then
 
u=`ls -l $USERDIR | egrep '^-' | wc -l`
 
for (( i=1; i<=$u; i++ ))
do
        user=`ls -l $USERDIR | egrep '^-' | awk {'print $9'} | head -$i | tail -1`
        echo "Checking user $user FrontPage status.."
        homedir=`cat $USERDIR/$user | grep HOMEDIRPATHS | sed 's/HOMEDIRPATHS=//'`
 
        if [ -d $homedir/public_html/_vti_pvt ]; then
                domain=`cat $homedir/public_html/.htaccess | grep AuthName | awk {'print $2'}`
                echo "FrontPage found. Removing FrontPage for $domain.."
                /scripts/unsetupfp4 $domain
        else
                echo "FrontPage not found for $user"
        fi
done
echo "Process completed"
 
else
  exit 0
fi

(Press ‘Ctrl-X’ then ‘Y’ then ‘Enter’ to save and exit from editor)

3. Change the permission of the script to executable:

[root@cpanel ~]# chmod 755 /root/removefp

4. Lets execute it and you should see something like below:

[root@cpanel ~]# /root/removefp
Are you sure you remove FP extension for all domains?  y
Checking user mygrate FrontPage status..
FrontPage not found for mygrate
...............

Kindly give feedback if you found above scripts is not running well in your box. Cheers!

3 Responses to cPanel – Remove FrontPage for All Accounts

  1. Oleg SmirnovNo Gravatar says:

    I am doing such job similar :) except getting user list :)

    for user list I am using

    users=`ls /var/cpanel/users | grep -v \/`

  2. VinayakNo Gravatar says:

    Tried it but it won’t detect FP installs and won’t remove any.

    Is it compatible with latest WHM/cPanel “WHM 11.34.0 (build 9)” as of date?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>