
Installed:
Ubuntu 22.04
PHP 8.2.4
Apache/2.4.56
Mysql 8.0.32
Composer 2.5.4
Same as closed issue: https://www.drupal.org/project/drupal/issues/3155818
When trying "composer create-project drupal/recommended-project /var/wwww/html" (or any other other folder)
I get next error :
"In ProjectInstaller.php line 69: mkdir(): Permission denied"
The only way to force is using sudo, but then I get the warning: "Do not run Composer as root/super user! ..."
I tried out all possible chown and chmod settings in vaine
last settings are next
drwxr-xr-x 2 jan www-data 471040 mrt 16 14:09 html
drwxr-xr-x 2 jan www-data 4096 mrt 16 15:55 test1
drwxr-sr-x 2 jan www-data 4096 mrt 16 15:59 test2
Should I force with sudo, or install manualy and use composer just for handling themes and modules?
Comments
It appears you're trying to
It appears you're trying to create the Drupal directory inside a directory that your user does not have permission to create directories in. I would either change that directory's permissions to allow your user to be able to write to it, or create your Drupal directory in another directory where your user does have permissions.
Contact me to contract me for D7 -> D10 migrations.
user jan has full read/write
user jan has full read/write/execute access to folder html
see command sniplet where a text file and folder were created and deleted
I notice you have one to many
I notice you have one to many W's here:
I would navigate to /var/www/html, then run the command.
Contact me to contract me for D7 -> D10 migrations.
Sorry, writing error. /var
Sorry, writing error. /var/wwww/html does not exist. Composer was launched from /var/www/html.
If you were already in that
If you were already in that directory, then the command was incorrect. It should be this:
composer create-project drupal/recommended-project drupal
This will create Drupal at /var/www/html/drupal.
Contact me to contract me for D7 -> D10 migrations.
I used this command, but
I used this command, but misunderstood the instruction 'composer create-project drupal/recommended-project my_site_name_dir' from
https://www.drupal.org/docs/develop/using-composer/manage-dependencies
My command was '/var/www/html$ composer create-project drupal/recommended-project /var/wwww/html/drupal'
So adding the dir name was producing the access error. Without it worked like a charm
Thanks for helping me.
Please, take a look at my explicative tutorial @ how to forge
Hi there,
i have recently added the step-by-step guide on how to allocate new drupal 10 website using composer.
But there is still some issue that persists:- having been installed through the composer, website has some intermediate path:
the root, where main composer.json resides, is followed by an additional directory /web
Thus, server-side configuration for website must be applied:
(Apache server)
After enabling the rewrite rule, an error appears:
Hope, somebody could suggest how to solve...unfortunately, no idea what to add there (/core/lib/Drupal/Core/Routing/TrustedRedirectResponse.php):UPD:
https://www.drupal.org/project/drupal/issues/2612160#comment-13623886
this method is correct
Hi,
Hi,
I suggest checking out this thread, it may be helpful
https://www.drupal.org/project/drupal/issues/3276209