Shopsys: Installation script does not set UID and GID of the user with not default ID

Created on 21 Jun 2019  路  4Comments  路  Source: shopsys/shopsys

What is happening

When user on Linux has different UID and GID than default 1000, installation will fail on creating folders, like vendor folder. This was described for example in https://stackoverflow.com/questions/56702148/ubuntu-shopsys-install-via-composer-docker-still-crashing/56703357#56703357

Expected result

Installation script will set right IDs in docker-compose.yml and docker-sync.yml

Bug

All 4 comments

On Linux, you can run sed to change the IDs:
sed -i -r 's#www_data_uid: [0-9]+#www_data_uid: $(id -u)#" ./docker-compose.yml sed -i -r 's#www_data_gid: [0-9]+#www_data_gid: $(id -g)#" ./docker-compose.yml

I guess there will be some Find and replace CLI tool on other platforms as well...

This (https://github.com/shopsys/shopsys/issues/1150#issuecomment-521253306) can be run on OS X with -E instead of -r, see https://github.com/shopsys/shopsys/blob/6febd2cea2288a61cffadf224e9622dd4d683548/packages/monorepo-tools/rewrite_history_from.sh#L38-L44

After merging #1342 this will not be a problem any more. I have added replacing _(U|G)ID_ into scripts/install.sh because of travis builds.

Hi @s3tezsky, nice! :+1: Could you please update the description of #1342 - if you add the keyword closes or fixes #1150, this issue will be closed automatically once the PR is merged :wink:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henzigo picture henzigo  路  4Comments

vitek-rostislav picture vitek-rostislav  路  4Comments

Miroslav-Stopka picture Miroslav-Stopka  路  4Comments

boris-brtan picture boris-brtan  路  4Comments

boris-brtan picture boris-brtan  路  3Comments