MagicSpam Extension Installation fails in Plesk 17

Recently we faced the below error while trying to install MagicSpam free version via plesk interface and got installed via command line using the rpm from the plesk download section. Since the plesk download section had too old version and plesk was showing an upgrade option and free version was not working (which I installed from rpm available at plesk )

Error while trying to install / upgrade from plesk interface is the below 
Failed
 Installation of extension has failed
 
 Execution of /usr/local/psa/tmp/modulehfmXQh/plib/scripts/pre-install.php failed with exit code 1 and the output:
 Failed to find operating system package manager rpm or dpkg.
 Contact support@magicspam.com with full details of your installation for assistance.

Normal rpm installation and yum install was working fine.

After a lot of reasearch, we got this fixed and the fix was below. May the below will help some of you.

Since the error was related to rpm command and this was a centos server, so we checked the permission of /bin/rpm with that of another server which had this working and came to know that permission of the /bin/rpm was 755 in the other one and 700 under the non-working one. I changed the same to 755 and got the installation working without any issues.

The real cause for this issue is LES Installation which will change the permissions of some binaries

From the installation log, I can see LES is changing permission of the binaries listed below to 700 

server les(5972): {sec.bin} chmod 700 /bin/dmesg
server les(5972): {sec.bin} chmod 700 /bin/mount
server les(5972): {sec.bin} chmod 700 /bin/rpm
server les(5972): {sec.bin} chmod 700 /usr/bin/write
server les(5972): {sec.bin} chmod 700 /bin/logger
server les(5972): {sec.bin} chmod 700 /usr/bin/ipcrm
server les(5972): {sec.bin} chmod 700 /usr/bin/ipcs
server les(5972): {sec.bin} chmod 700 /usr/bin/free
server les(5972): {sec.bin} chmod 700 /usr/bin/locate
server les(5972): {sec.bin} chmod 700 /usr/bin/wall
server les(5972): {sec.bin} chmod 700 /sbin/arp
server les(5972): {sec.bin} chmod 700 /sbin/ifconfig
server les(5972): {sec.bin} chmod 700 /usr/sbin/repquota
server les(5972): {sec.bin} chmod 700 /usr/sbin/tcpdump
server les(5972): {sec.bin} chmod 700 /usr/bin/wget
server les(5972): {sec.bin} chmod 700 /usr/bin/lynx
server les(5972): {sec.bin} chmod 700 /usr/bin/cc
server les(5972): {sec.bin} chmod 700 /usr/bin/gcc
server les(5972): {sec.bin} chmod 700 /usr/bin/logger
server les(5972): {sec.bin} chmod 700 /usr/bin/who
server les(5972): {sec.bin} chmod 700 /usr/bin/w
server les(5972): {glob} sec.bin enabled

So those who have LES installed, make sure to fix the permissions of the needed one and especially for rpm and wget you may have to change the permissions to 755.

To check the permission, you can use the below command

# which rpm

# ls -l "which rpm"

Once this is done, check whether the permission is 755. You can set 755 permission using the following command.

# chmod 755 "which rpm"

Hope this helps

 

 

Facebook Comments