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

bug? PHP open_basedir in dolibarr v20 image #10

Open
JonBendtsen opened this issue Sep 18, 2024 · 3 comments
Open

bug? PHP open_basedir in dolibarr v20 image #10

JonBendtsen opened this issue Sep 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@JonBendtsen
Copy link
Contributor

JonBendtsen commented Sep 18, 2024

From Home, Admin Tools, about security
/admin/system/security.php?mainmenu=home&leftmenu=admintools

bug? PHP open_basedir in dolibarr v20 image

PHP open_basedir =  No   (Recommended: Some restricted path for data files, Example: /var/www/html,/var/www/documents)

Probably should be restricted

@JonBendtsen
Copy link
Contributor Author

/usr/local/etc/php/php.ini

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; Note: disables the realpath cache
; https://php.net/open-basedir
;open_basedir =

@JonBendtsen
Copy link
Contributor Author

But we could also set it in the apache configuration

https://stackoverflow.com/questions/13291185/how-to-set-for-specific-directory-open-basedir

it is probably easier in the dockerfile to have a sed line that modifies /usr/local/etc/php/php.ini than to add an extra line to /etc/apache2/sites-enabled/000-default.conf

@JonBendtsen
Copy link
Contributor Author

  1. method could possible to create a /etc/apache/mods-enabled/php.conf file.

I did, with the contents 'php_admin_value open_basedir "/var/www"'

and guess what - I could no longer log in :-(

so that value is probably wrong :-(

@creekorful creekorful added the enhancement New feature or request label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants