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

Fix test for run of 'fix-permissions.sh' early in the ISLE build process #350

Open
Digital-Grinnell opened this issue Nov 21, 2019 · 0 comments
Labels
ISLE-APACHE Related to the Docker ISLE-Apache image NON-BLOCKER This issue doesn't block release

Comments

@Digital-Grinnell
Copy link
Contributor

Issue description

In my 'local' builds of ISLE there are conditions that cause the fix-permissions.sh script to run and issue error messages early in the build process. I've confirmed through tests that these "errors" are innocuous, they do no apparent harm, and that they do NOT occur when building a 'demo' instance from a pristine copy of ISLE. However, they are annoying and should be corrected to not return a false-negative error message.

In my tests, when the condition is present I find that the apache container has a /var/www/html/sites directory, so the test wrapper around the fix-permissions.sh call returns TRUE; however, the /var/www/html directory is otherwise EMPTY, so there's no valid Drupal site available for the script to act on.

I believe the test to run the script should be something more like this:

## Fix permissions using the drupal fix-permissions script.
if [ "$(-f /var/www/html/index.php 2> /dev/null)" ]; then 
    # Fix site directory permissions

For an issue, describe steps to reproduce the issue

System setup (OS information, software versions, etc):

  • In my case running OSX, any version.

Steps:

  1. Clone https://github.com/Digital-Grinnell/dg-isle/tree/local
  2. cd to the clone
  3. docker-compose up
What's the expected result?

Errors like this...

...
[services.d] starting services
Running fix-permissions script...
[services.d] done.
*********************************************
* Error: Please provide a valid Drupal path. *
*********************************************
This script is used to fix permissions of a Drupal installation
you need to provide the following arguments:
  1) Path to your Drupal installation.
  2) Username of the user that you want to give files/directories ownership.
  3) HTTPD group name (defaults to www-data for Apache).
Usage: (sudo) bash fix-permissions.sh --drupal_path=PATH --drupal_user=USER --httpd_group=GROUP
Example: (sudo) bash fix-permissions.sh --drupal_path=/usr/local/apache2/htdocs --drupal_user=john --httpd_group=www-data
XDEBUG OFF
...
What's the actual result?

There's no Drupal root to set permissions against at this early point in the build, so the fix-permissions.sh script has NOTHING to act on. There is NO harm in running the script, but the "error" message is both annoying and misleading.

@McFateM McFateM added ISLE-APACHE Related to the Docker ISLE-Apache image NON-BLOCKER This issue doesn't block release labels Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISLE-APACHE Related to the Docker ISLE-Apache image NON-BLOCKER This issue doesn't block release
Projects
None yet
Development

No branches or pull requests

2 participants