-
Notifications
You must be signed in to change notification settings - Fork 47
DDEV install fails, because web folder is owned by root #94
Comments
Fun times. Maybe something broke upstream in DDEV? What version are you on? |
Host machine is Debian 12. If I create a standard DDEV Drupal 10 instance, everything works as usual. |
Try changing the ownership of the web folder to match the other folders. Ensure the web folder is owned by your
|
Thanks for the suggestion, and that's also what I did as a workaround. But it shouldn't be necessary in the first place ... An observation: The Also, if I
This also doesn't happen in standard DDEV/Drupal installations, so something is off with the permissions in Starshot ... |
I agree with @gitressa, it should not necessary to change the permissions yourself as a workaround. If you look at So I'm a bit stumped as to why this would be happening. |
Yea, it's strange. I wonder if the issue below and its PR are connected to this? It may have started since the release of DDEV 1.23.1 a week ago ... |
It is strange on my side as well. I am on an Apple Silicon Mac and upgraded to the latest DDEV and installed Starshot without a problem. As soon as I launched it, it works, but soon after the database errors hit me like explained here: #59 |
I think it is an issue with the My workaround has been to edit the host > command > install file Add a step to: |
Thanks for sharing @roromedia and @thegbomb. My hunch is that "something" changed with DDEV 1.23.1 and instead of creating the In the meantime, as a workaround, Starshot could ship with an empty |
It is because of the change in working_dir:
web: /var/www/html/web
And the
I think you should commit the |
I think that sounds like a good workaround. Let's create |
Merged #95, so tentatively closing this, but please reopen if the trouble persists. |
Just a note: If you're having ownership of files changed to root ownership, something is wrong with your Docker setup. I think @gitressa is a linux user, I'd be happy to debug this with you, please come over to the DDEV Discord and let's look. DDEV goes to great lengths to make sure that this never happens, and runs all of its containers (especially the web container) as the normal user (not as root). Maybe you're running an additional container that runs as root in this environment? |
Thanks for the analysis and solutions. As I commented earlier, I also need to |
Yes, it seems that this is a longstanding Docker bug on Linux, but for various reasons it rarely shows up with DDEV, but in this case it's a result of the working_dir being set. |
With I do still need to |
@gitressa your umask must be set very restrictively. Please try |
If the problem is my set up, shouldn't a standard Drupal 10 installation have the same problem then?
|
Please |
Sure!
|
Oh, sorry, I misread your original set of issues. You said
But I read "I have to chmod web". Your issue is a result of the thing Drupal has done from the beginning of the universe of making sites/default read-only. It's a crazy thing and not something an application should do IMO. DDEV prevents this problem by adding to settings.ddev.php the line |
No, I don't think so. Drupal is always trying to set that directory read-only. Just use the Drupal settings technique with Note that this has nothing to do with Drupal 10, Drupal 11, or Starshot. It's all about how Drupal has behaved since maybe Drupal 5 or something. |
My aim is to make the Starshot folder deletable out-of-the-box, without the user having to do anything, just like a standard DDEV Drupal 10 installation ... Do you think adding |
I don't understand why it wouldn't just be set in settings.php to begin with (as it is with DDEV). So if this project is creating a settings.php, add it. Or add a settings.local.php. My preference of course would be to just use DDEV for local dev, which has these things dialed in, and which also uses "real" database types. |
I would definitely be ready to review it, if the DDEV team were to make an MR, to improve DDEV integration in Starshot ... |
We already have so much trouble with scope... I don't know why there should be a problem with DDEV integration with Starshot. If there are problems, you know we're here to help. (Early on, it looked like Starshot for some reason was unwilling to use drush or standard database types, and was using the very crippled and mostly unmaintained in-core installer. That may be the issue, not sure.) |
Okay, folks... This isn't DDEV's responsibility to fix. I'm guessing this happens because I disabled DDEV's settings management in To me, this is a case of several reasonable assumptions (from Drupal and from DDEV) turning bad when they converge. The proper fix here would be to allow DDEV to manage the site settings -- and, indeed, to use DDEV's built-in database by default, rather than SQLite -- but I'm pretty sure that's not going to fly until I'm not sure if there's an issue/patch for that already; I feel like I saw @mglaman working on that, but I might have imagined it. If there IS such a patch, and it's likely to be accepted by the core committers, then Starshot could go ahead and apply that patch and take advantage of it to fix this. |
@rfay We're using the core installer because it's not unmaintained, and currently it's the only installer I know of that can install directly from a recipe. If Drush added support for that (that is, |
The core installer can only do sqlite3 and hasn't been touched since 2018. I spent some time looking at it for which had the same class of problem, ddev-drupal-core-dev was tethered to the core installer. We're going to have it untethered soon, but it's a standard problem. Sqlite3 is not "normal" or representative of real situations, and the core installer is also not capable of doing what "normal" drupal does. |
Getting rid of SQLite in favour of any mySQL flavour would be very much appreciated! |
Can't we switch away from quick-start feature to regular composer installation with "--no-install" flag and then run "drush site:install" and the needed recipes via drush? |
Getting rid of SQLite is a non-starter, IMHO, because that would kill the "zero to Drupal in one command" functionality. But being able to override it is an existing feature request. We do ultimately need to be able to install into MySQL or Postgres. |
@roromedia The core installer already supports that, but Drush would need to as well before we could switch to using it. Not sure if Drush already has an open PR for that...I know they already added a
|
Thanks @phenaproxima for clarifying, makes sense. Seems overriding database in the quick-start feature would be the best approach for this. |
It wouldn't make sense to "get rid of" Drupal's longstanding support of SQLite. Supporting the "normal" Drupal usage of other databases makes lots of sense. However, if "Zero to Drupal in one command" were to fundamentally mean installing with sqlite, it will quickly be considered a fraud by users, because once they do it they have no place to go forward, and they can't even use the database they export in a real situation. It may have value, but super important not to over-promise. For example the built-in webserver in PHP is a useful tool, but if it were promoted as a full webserver, it would way out-promise its reality. |
I completely agree @rfay . Also all the benefits of a quick-start are gone immediately if you end up with SQLite after the installation. I would also hope for mySQL from day one as Starshot should cater to a different focus group which should be less developer-oriented and therefore very easy to deploy on any "regular" (IMHO any LEMP/LAMP/MAMP stack) hosting. The most common stack where any mySQL-flavour is pre-configured would be the easiest for new Starshot-users. |
I think there are 2 things going on the quick-start one click installer is one thing, but this prototype is a different scenario in itself. By adding ddev, we have already moved away from the one click installer as we need docker and ddev installed to use this. |
The first option for many users might still be the composer-based one-liner which facilitates composer create-project without any DDEV as stated in the README.md here: https://github.com/phenaproxima/starshot-prototype/?tab=readme-ov-file#installation |
|
I am not sure when this started, I first noticed it a few days ago. Hoping it was an isolated event, which would go away next time, I just chowned
web
-folder to my user, and ran the command again. But it happened again ...To reproduce, install Starshot in DDEV with the README method, and see that it fails, since
web
folder is not writable. Excerpts from the command line:web
folder is owned byroot
:The text was updated successfully, but these errors were encountered: