Inconsistent /var/www/html ownership in lima hosted ddev #6273
Unanswered
deviantintegral
asked this question in
Q&A
Replies: 2 comments 12 replies
-
It's super important to know if you were using Virtiofs ? And what Lima version? And recent Lima instance? they just switched to Ubuntu 24.04; you don't get that new version without a rebuild. It's quite normal on Linux for mounted directories to take the ownership of the underlying mount point, so could that be it? |
Beta Was this translation helpful? Give feedback.
5 replies
-
More cursed ownership behaviour - it looks like ownership is also calculated based on the running user 😮 :
I'm going to switch this project to use mutagen again, and exclude the code directories in its config. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I ran into difficulties on a project running Task, this time in a project not using mutagen. It turned out the problem is this line, and it's failing on the ownership check:
https://github.com/go-task/task/blob/fb9f6c20abb95b5cd120c49507492cf509c828f7/taskfile/taskfile.go#L155
I spun up a basic Drupal 10 project I had, and it exhibited the same behaviour. Yet, when I looked with ddev ssh, the ownership looked fine. After debugging task, I did confirm that the owner was being returned as root, and not my user account.
So why would
ddev ssh
show different ownership thanddev exec
?Check out the differences in this output, specifically the Uid / Gid:
So with this, we know there's no issue in the exec or ssh calls themselves. It's like spawning an interactive app (bash) versus one that isn't (the first two) is causing different ownership to be returned.
This feels like a file handle on
/var/www/html
has been opened by Docker, something then runs a chown, and exec'ing a non-interactive process is returning cached ownership info.Yet normally I'd expect the whole file stat structure to be one set of cached object. I can touch the project directory on my host, and the Access / Modify / Change stamps all update, but the root owner is preserved. So weird!
I checked with OrbStack, and this isn't a problem there. Though, strangely
ls
doesn't show the usual.
and..
directories, so I feel like OrbStack is likely also applying its own ownership rules.I also checked by just using lima (and not colima) with the same behaviour.
Any ideas? I searched both ddev and lima / colima for any chowns, and while this totally feels like it's a chown running on ddev start, I couldn't find one anywhere.
Beta Was this translation helpful? Give feedback.
All reactions