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

Confusing post install instructions #1

Open
smmccabe opened this issue Dec 20, 2017 · 4 comments
Open

Confusing post install instructions #1

smmccabe opened this issue Dec 20, 2017 · 4 comments

Comments

@smmccabe
Copy link
Member

reported by andyd in slack:

At end of composer install come the

Create a sites/default/services.yml file with chmod 0666
Create a sites/default/files directory with chmod 0777```

messages. I'm guessing that these are hard to change and come from core but the site is actually installed into *web*/sites... so following these instructions won't work.

As it turns out both service.yml & settings.php exist in this install so they don't need to be created and their permissions are already 666  so they don't need chmod either. If the messages could be removed or replaced with something about creating a database and setting up a webserver that would probably be ideal.
@frederickjh
Copy link

This is coming from scripts/composer/ScriptHandler.php. Not sure what project that is coming from. Outuput that @smmccabe is referring to looks like this:

DrupalProject\composer\ScriptHandler::createRequiredFiles
Create a sites/default/settings.php file with chmod 0666
Create a sites/default/services.yml file with chmod 0666
Create a sites/default/files directory with chmod 0777

image

Section from scripts/composer/ScriptHandler.php that is generating this:

// Prepare the settings file for installation
        if (!$fs->exists($root . '/sites/default/settings.php') and $fs->exists($root . '/sites/default/default.settings.php')) {
            $fs->copy($root . '/sites/default/default.settings.php', $root . '/sites/default/settings.php');
            $fs->chmod($root . '/sites/default/settings.php', 0666);
            $event->getIO()->write("Create a sites/default/settings.php file with chmod 0666");
        }

        // Prepare the services file for installation
        if (!$fs->exists($root . '/sites/default/services.yml') and $fs->exists($root . '/sites/default/default.services.yml')) {
            $fs->copy($root . '/sites/default/default.services.yml', $root . '/sites/default/services.yml');
            $fs->chmod($root . '/sites/default/services.yml', 0666);
            $event->getIO()->write("Create a sites/default/services.yml file with chmod 0666");
        }

        // Create the files directory with chmod 0777
        if (!$fs->exists($root . '/sites/default/files')) {
            $oldmask = umask(0);
            $fs->mkdir($root . '/sites/default/files', 0777);
            umask($oldmask);
            $event->getIO()->write("Create a sites/default/files directory with chmod 0777");
        }

I think the wording should for each of these sentences should be changed to "Now creating . . .
Can someone identify the upstream project that this code belongs to and then push this issue to it?

Thanks!
Frederick

@frederickjh
Copy link

I found the related project AcroMedia/commerce-install-backend that contains this code. Can one of the maintainers move this issue to that project?
Thanks!

@joshmiller83
Copy link
Contributor

It's actually upstream from that repo, coming from the drupalcommerce/project-base or perhaps it inherits from what it's based on. Either way, we should probably remove them.

@thejacer87
Copy link
Contributor

@smmccabe @joshmiller83 so is this something we can change in this project? can i close this issue?

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

No branches or pull requests

4 participants