Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership of .composer directory #562

Closed
roger10010 opened this issue Oct 24, 2021 · 4 comments
Closed

Ownership of .composer directory #562

roger10010 opened this issue Oct 24, 2021 · 4 comments

Comments

@roger10010
Copy link

roger10010 commented Oct 24, 2021

Description

Deployment to Ubuntu 20.04 server and Ubuntu 21.10 Desktop

Steps To Reproduce
1.

Expected Result

Actual Result

@roger10010
Copy link
Author

The following issue report details that .composer should not be owned by root,

#447

The problem I am seeing is that when deploying to a Linux environment that is the ownership that is set as the one-liner script runs and creates the directory. Below is a ls -la from my ~ directory. This shows everything being correctly flagged as owned by my account, apart from .composer which somehow is being flagged as root.

roger@docker:~$ ls -la
total 88
drwxr-xr-x 10 roger roger 4096 Oct 24 16:05 .
drwxr-xr-x 3 root root 4096 Oct 21 14:42 ..
-rw------- 1 roger roger 271 Oct 24 15:55 .bash_history
-rw-r--r-- 1 roger roger 220 Feb 25 2020 .bash_logout
-rw-r--r-- 1 roger roger 3771 Feb 25 2020 .bashrc
drwxrwxr-x 2 roger roger 4096 Oct 24 16:00 bin
drwx------ 2 roger roger 4096 Oct 21 14:43 .cache
drwxr-xr-x 2 root root 4096 Oct 24 16:03 .composer
-rw-rw-r-- 1 roger roger 360 Oct 24 16:01 docker-compose.dev-linux.yml
-rw-rw-r-- 1 roger roger 206 Oct 24 16:01 docker-compose.dev-ssh.yml
-rw-rw-r-- 1 roger roger 800 Oct 24 16:01 docker-compose.dev.yml
-rw-rw-r-- 1 roger roger 2595 Oct 24 16:01 docker-compose.yml
drwxrwxr-x 2 roger roger 4096 Oct 24 16:00 env
drwxrwxr-x 7 roger roger 4096 Oct 24 16:01 .git
-rw-rw-r-- 1 roger roger 5 Oct 24 16:01 .gitignore
-rw-rw-r-- 1 roger roger 5716 Oct 24 16:01 Makefile
-rw-r--r-- 1 roger roger 807 Feb 25 2020 .profile
drwxr-xr-x 4 root root 4096 Oct 24 16:03 .ssh
-rw-r--r-- 1 roger roger 0 Oct 21 14:44 .sudo_as_admin_successful
drwxrwxr-x 3 roger roger 4096 Oct 24 16:00 template
drwxrwxr-x 2 roger roger 4096 Oct 24 16:00 .vscode
-rw------- 1 roger roger 104 Oct 24 16:05 .Xauthority

@roger10010
Copy link
Author

Update

Changing ownership of .composer from another shell while the install is waiting for the Magento keys to be entered allows the install to proceed without throwing up access errors.

@roger10010
Copy link
Author

Update

The issue seems to be with the setup related to the docker-compose.yml file.

Docker is running as root and so when docker-compose requests the app service to be created, the 3 volumes listed with paths (~/.composer, ~/.ssh, ~/.ssh/known_hosts:) are created by docker as they do not already exist and docker creates them with its account details.

I've run out of time tonight, but my guess is that this can be resolved by having the install script create these directories, before docker-config is called.

@markshust
Copy link
Owner

Ah thanks, I never thought of these not existing. I added this to lib/template since that file is executed during all automated and manual setup processes. mkdir -p will silently fail if they already exist, and touch should create the files if they do not already exist, otherwise everything should proceed the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants