Skip to content

Cannot change file owner in docker container #25964

Answered by Yanjingzhu
fpalamour asked this question in Actions
Discussion options

You must be logged in to vote

Sorry for the delay response. It spent me quite a time to reproduce and troubleshoot this issue.
I tried in my local machine, using docker-compose also has the same issue. The owner of files are root, not www.

version: '3.5'
services:

#PHP Service
app:
......
volumes:
- .:/var/www
- ./docker/php/local.ini:/usr/local/etc/php7/conf.d/

Finally, I found that In your docker-compose file you added a volume from current working folder (on the hosted runner machine $GITHUB_WORKSPACE ) to /var/www (inside container).
This will cover all the existing files under /var/www inside container. And the owner of files on hosted runner is runner.
I would recommend you modi…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@geocfu
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants