phpbu icon indicating copy to clipboard operation
phpbu copied to clipboard

is_executable(): open_basedir restriction in effect

Open oliversum-ch opened this issue 4 years ago • 3 comments

Hey Sebastian Thanks for creating PHPBU! I'm using it on shared hosting. It works very well when using it via command line, but I get this error when using it via a cron job:

Warning: is_executable(): open_basedir restriction in effect. File(/bin/bzip2) is not within the allowed path(s): [...]

I assume that phpbu is checking if bzip2 is installed, but I don't have access to /bin/. Is it possible to deactivate this check? Thank you very much!

oliversum-ch avatar Oct 19 '21 10:10 oliversum-ch

Currently you can't specify the path to the compressor binaries. But how does it work if you run it on the command line? You can check which bzip2 binary you use on the terminal by running $ which bzip2 It looks like your cron environment is different to your command line environment.

If you know where your binaries are located I could add an option to the configuration to add directories to look for the binaries.

sebastianfeldmann avatar Oct 19 '21 12:10 sebastianfeldmann

Thanks for your reply! Agree, it looks like the corn and cli environment are different.

Mhm, I get an error:

$ which bzip2
-jail: which: command not found

But according to my hoster, the path to bzip2 is correct (/bin/bzip2). They just recommend deactivating the is_executable() test, as I don't have access to /bin/.

oliversum-ch avatar Oct 19 '21 13:10 oliversum-ch

Ah ok that somehow makes sense. It still doesn't explain why it works in your environment and not in that of your cron user 🤔

sebastianfeldmann avatar Oct 19 '21 16:10 sebastianfeldmann