Skip to content
Snippets Groups Projects

Issue #3231992: Make the staged sites/default writable before cleaning

Merged Issue #3231992: Make the staged sites/default writable before cleaning
1 unresolved thread
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ted Bowman
  • Ted Bowman
    Ted Bowman @tedbow started a thread on the diff
  • 54 $this->pathLocator = $locator;
    55 }
    56
    57 /**
    58 * {@inheritdoc}
    59 */
    60 public function clean(string $stagingDir, ?ProcessOutputCallbackInterface $callback, ?int $timeout = 120): void {
    61 // Ensure that the staged site directory is writable.
    62 $site_dir = implode(DIRECTORY_SEPARATOR, [
    63 $stagingDir,
    64 $this->pathLocator->getWebRoot() ?: '.',
    65 $this->sitePath,
    66 ]);
    67
    68 if ($this->directoryExists($site_dir)) {
    69 (new Filesystem())->chmod($site_dir, 0777);
    • is there any risk if clean() doesn't work that have set this to 0777? Maybe not because this is in the temp directory ?

    • Author Maintainer

      Yeah, it's just cruft in a temp directory, so I figured it's not risky to have it be 0777.

    • I think the the only danger is if at some point we switched back to having the stage directory nested inside the drupal/web root. Then we would have copy of your code available in the web root that is 777

    • Please register or sign in to reply
  • Adam G-H resolved all threads

    resolved all threads

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • 6b713160 - Add comment warning about world write

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading