Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_executable(): open_basedir restriction in effect #308

Open
oliversum-ch opened this issue Oct 19, 2021 · 3 comments
Open

is_executable(): open_basedir restriction in effect #308

oliversum-ch opened this issue Oct 19, 2021 · 3 comments
Labels

Comments

@oliversum-ch
Copy link

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!

@sebastianfeldmann
Copy link
Owner

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.

@oliversum-ch
Copy link
Author

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/.

@sebastianfeldmann
Copy link
Owner

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 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants