cPanel – Remove FrontPage for All Accounts

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:

[[email protected] ~]# nano /root/removefp

2. Copy and paste following scripts:

# Remove Frontpage Extension for all accounts in cPanel server
read -p "Are you sure you remove FP extension for all domains? <y/N> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
u=`ls -l $USERDIR | egrep '^-' | wc -l`
for (( i=1; i<=$u; i++ ))
        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
                echo "FrontPage not found for $user"
echo "Process completed"
  exit 0

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

3. Change the permission of the script to executable:

[[email protected] ~]# chmod 755 /root/removefp

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

[[email protected] ~]# /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!

4 thoughts on “cPanel – Remove FrontPage for All Accounts

  1. I am doing such job similar 🙂 except getting user list 🙂

    for user list I am using

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


  2. 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?


    1. I am afraid it is incompatible with this version, as this post is already 1 year plus old. Sorry man..


  3. execute this line below as root and youre done in no time :

    for oi in `cat /etc/trueuserdomains | cut -d”:” -f1`; do /scripts/unsetupfp4 $oi ; done



Leave a Reply

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