cpanel

How to disable Compress and Extract buttons from cPanel File Manager?

The Compress and Extract functions use the binary files /usr/bin/zip and /usr/bin/unzip, respectively.  To prevent those functions from working, you have a couple of options.

You can remove the “zip” RPM package, which will remove both files.  That is the simplest thing to do, and it is not likely to cause problems, because native Linux software usually does not use zip/unzip. In other words, zip/unzip on a Linux server is mainly for Windows compatibility.

The other thing you can do, is change the permissions on /usr/bin/zip and /usr/bin/unzip to prevent non-root users from executing them.  Changing the permissions on those files from 755 to 744 or 700 would accomplish this.

If you are sure you do not need zip, though, I would recommend just removing the RPM package.  The following command will do this:

# rpm –erase –nodeps zip

Most native Linux software uses the bz2 or gzip format, which are handled by different programs, so removing zip/unzip will not break cPanel updates.

Comments on this post