Comments (7)
Hi @TonySma
I guess you are on Linux, right? Because I did not face this problem on Mac. I think the problem comes from the php entrypoint here:
During the spin up of containers we need to ensure that user app
owns the project files. This user has id 1000
inside images and is the user used by nginx and phpfpm. In Mac there is no problem with that because of a virtualization layer that separates host and container, so permission are not changed in the host. I see now that it doesnt seem to be same in Linux. It seems that if permissions change inside containers it also affects your host permissions. You are seeing
1000` because you might not have any user with this uid.
To be honest I am not sure if there is a way to avoid that in linux with some docker configuration or if that is normal. I would try to get some more info about that. Until then, I would also appreciate if you could also help us to find a solution for that ;)
from magento2-dockergento.
@jalogut as example for Linux we could use different image without changing permissions
from magento2-dockergento.
@ihor-sviziev well the idea is to use same images for all environments. Anyway, permisions need to be changed in Linux too because containers files need to be owned by app
user. If we do not change them, nginx and php services could not read/write files when executing the project.
from magento2-dockergento.
Not sure if it will be easy to add support for different user IDs, probably we can add it as "limitations" in readme file
from magento2-dockergento.
Hi!
Maybe we can try to do the matching between uids & guid with a script when container is started.
I will look at this.
Tony
from magento2-dockergento.
Hi @TonySma and @ihor-sviziev
I just created PR #40 to match uid
and gid
on host when the containers start.
Until it gets merged, we would appreciate if you could checkout the branch fix-perms
and test it on your computers?
You only need to execute dockergento start
. Then the script checks the uids
and correct them if they are not matching.
Thanks
from magento2-dockergento.
I'm closing this issue, it should be solved since #40 was merged.
from magento2-dockergento.
Related Issues (20)
- Feature request: add support for Magento 2 EE HOT 3
- Feature request: Add container for cron jobs HOT 1
- Mailhog Setup HOT 2
- modestcoders/node-php:node8-php7.3 is not avalible HOT 4
- how to set it as production HOT 2
- PHP 7.4 Support HOT 3
- SQLSTATE[HY000] [2002] No such file or directory HOT 1
- Path cannot be mirrored HOT 1
- Multiple database HOT 1
- Composer github oauth
- sample data install fails / composer error php 7.2 magento v 2.3.2 HOT 2
- Can't copy project files into host HOT 1
- Grunt compilation failure
- FEATURE: Mage2run HOT 3
- PHP 8 version
- Apple silicon m1
- More detailed docs?
- nginx version
- permission issues
- Magento 2.4.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-dockergento.