public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] messagebus keeps 0wning my files
@ 2010-06-22 22:34 Albert Hopkins
  2010-06-23  2:41 ` [gentoo-user] messagebus keeps 0wning my files [SOLVED] Albert Hopkins
  0 siblings, 1 reply; 2+ messages in thread
From: Albert Hopkins @ 2010-06-22 22:34 UTC (permalink / raw
  To: gentoo-user

I've had this problem for a while now but it's finally driven me mad.

I have a directory with some local mercurial repos.  I'm the only user
who touches these repos.

Things will go fine for a while, and suddenly I'll do a commit and then
hg will die with 

abort: Permission denied:

on one of the ./hg/* files.  When I look at the file I'll find it's
owned by 1000:messagebus.  So I'm too busy to investigate so I just
"sudo chown -R $USER:users ~/path/to/repo" and go along my way... then
the next day—or whenever—the same thing happens again!

It's weird because I don't have a user with uid=1000 in /etc/passwd, but
messagebus has a gid=1000.  Also the seems to only happen to the two Hg
repos I am working on.

The last time this happened (just now), the mtime on the file is 18
June.  The ctime is 19 June (the fs is mounted with noatime).  The last
time I did the chown thing was on the 20th (so the ctime kinda doesn't
make sense, if I understand correctly), so could this possibly be a bug
in the fs (ext4)?







^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-user] messagebus keeps 0wning my files [SOLVED]
  2010-06-22 22:34 [gentoo-user] messagebus keeps 0wning my files Albert Hopkins
@ 2010-06-23  2:41 ` Albert Hopkins
  0 siblings, 0 replies; 2+ messages in thread
From: Albert Hopkins @ 2010-06-23  2:41 UTC (permalink / raw
  To: gentoo-user

Well this was interesting...

One thing that mercurial does is if you clone a repo and the target
directory is on the same filesystem as the source, it create hardlinks
of files on the destination for efficiency.  Well this is fine, but...

One of the things my project does is create a virtual appliance of
itself, and how it does that is it creates a chroot, installs gentoo,
installs itself, and then copies the chroot to a disk image.  Well, this
happens on the same filesystem (as root) and in the appliance-making
process a user is created in the chroot and also the rep is cloned
inside the chroot and chowned to that user.  Well the first regular uid
is 1000 and since "hg clone" was making symlinks, my repo got ownership
changed to the user inside the chroot :|

So the fix is to use "hg clone" with the "--pull" option to prevent
mercurial from creating hard links.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-23  3:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-22 22:34 [gentoo-user] messagebus keeps 0wning my files Albert Hopkins
2010-06-23  2:41 ` [gentoo-user] messagebus keeps 0wning my files [SOLVED] Albert Hopkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox