Plugins can´t be installed

We have installed OJS ( and have observed problems when trying to install plugins from Plugin Gallery. In all cases, the popup notification indicates The tar command is not available. Please correctly configure it in your “”…

Hello @Fernando_Campos_Casa.

This error message usually means that the path to the tar command in the is incorrect. Please make sure that it is configured properly in - if it looks correct and you are still getting an error message, please show us your tar config and hopefully someone can help.

Good Morning,

I write in this post because I read about a problem similar to the one I have with the tar command

The OJS is and in “” the tar configuration is

"; tar (used in backup plugin, translation packaging)
tar = / bin / tar "

In the system information I see that route

Tar OJS Info

In the PHP information (Version 7.2.34) it is enabled


In the SSH it shows that the path is / bin / tar / and the server administrator tells me that it is that path.

The server works with Linux

Datos servidor OJS

Does anyone know how to solve it? Is there another 3x version that doesn’t have this problem?


Apparently some server configurations prevent the following test in lib/pkp/classes/plugins/ to succeed (tested on OJS, but see this part in too):

// Test whether the tar binary is available for the export to work
		$tarBinary = Config::getVar('cli', 'tar');
		if (empty($tarBinary) || !file_exists($tarBinary)) {
			throw new Exception(__('manager.plugins.tarCommandNotFound'));

even though the tar command is available and working.

After commenting the whole “if” statement above I could install a new plugin/theme.

According to my server provider this test won’t be allowed due to security measures, so maybe this issue could be addressed somehow?

Hi @piotreba,

Is it specifically the !file_exists($tarBinary) part of the test that breaks? Do you know what mechanism they’re using to intervene in that test?

Alec Smecher
Public Knowledge Project Team

@asmecher, I tested this and indeed, only the “!file_exists($tarBinary)” part of the condition seems to be problematic, not the “empty($tarBinary)” one.

Hi @piotreba,

Can you find out the mechanism they’re using to prevent file_exists from working as expected? For example, are they using open_basedir restrictions?

Alec Smecher
Public Knowledge Project Team

I will, and will come back here.

@asmecher, I confirm that file_exists condition failure results from open_basedir restrictions.

Hi @piotreba,

Ah, I understand. This leads to the unusual circumstance that PHP reports that /bin/tar does not exist, but system can execute it. I view this is a hole in the open_basedir set of options in PHP; in my opinion it’s pointless to enable this while system is usable.

However, rather than changing this interaction directly, there is another proposed change that will moot the discrepancy:

I’d suggest maintaining your local modification to that test, and when the above issue is implemented, your change can be reverted.

Alec Smecher
Public Knowledge Project Team

Thanks @asmecher. Will test this in subsequent updates.

1 Like