I just ran into an issue where I was unable to run a migration from a CSV file deployed via Git to an Acquia cloud server.
This was due to file permission issues.

I discovered that this is due to the migrate_source_csv module requiring write access mode for the csv file.

https://git.drupalcode.org/project/migrate_source_csv/blob/8.x-3.x/src/P...

return Reader::createFromStream(fopen($this->configuration['path'], 'r+'));

My question here is, why is write permission required? When would we ever want to modify the file? Is there a reason we cannot use 'r' (as this would work fine on Acquia).

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Leon Kessler created an issue. See original summary.

heddn’s picture

That's just a copy/paste mistake when pulling in that code from the league/csv project. Happy to take patches that will fix the issue.

Leon Kessler’s picture

Status: Active » Needs review
FileSize
520 bytes

Here's a tiny patch to remove the write permission.

  • heddn committed 56c3ca0 on 8.x-3.x authored by Leon Kessler
    Issue #3066702 by Leon Kessler, heddn: Why are write permissions...
heddn’s picture

Status: Needs review » Fixed

Thanks!!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.