docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

Composer ownership problem

Open guilhermes027 opened this issue 2 years ago • 1 comments

Description Hi, i'm trying to import an existing project that is build in Magento 2.4.3-p1 version. During the process that will be described below i receive this error:

(a lot of attempts above of changing the ownership of the files) chown: changing ownership of '/var/www/.composer/cache/files': Operation not permitted chown: changing ownership of '/var/www/.composer/cache': Operation not permitted chown: changing ownership of '/var/www/.composer/config.json': Operation not permitted chown: changing ownership of '/var/www/.composer': Operation not permitted chown: changing ownership of '/var/www/.ssh/id_rsa': Operation not permitted chown: changing ownership of '/var/www/.ssh/known_hosts': Operation not permitted Filesystem ownerships fixed.

[RuntimeException]
Could not read /var/www/.composer/config.json

file_get_contents(/var/www/.composer/config.json): failed to open stream: Permission denied

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [] [] []

cp: cannot open '/var/www/.composer/auth.json' for reading: Permission denied

I've already tried changing the ownership of the current directorie (/var/www/) with the command: sudo chown -R pc07:pc07 .

Steps To Reproduce in your root type those commands below: mkdir Sites cd Sites mkdir "my_store" cd "my_store"

now you type: curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash and bin/download magento 2.4.3-p1 community

and the error appears.

guilhermes027 avatar Aug 01 '22 15:08 guilhermes027

I am also facing the same issue when trying to install new version

ratikant-singh avatar Aug 04 '22 13:08 ratikant-singh

Closing as non-issue. Please see https://github.com/markshust/docker-magento/issues/447#issuecomment-818699538

markshust avatar Dec 04 '22 14:12 markshust