savannah-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Permission denied when pushing changes into newly created GNU Health


From: Amin Bandali
Subject: Re: Permission denied when pushing changes into newly created GNU Health repositories
Date: Tue, 01 Dec 2020 00:04:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Luis,

Luis Falcon writes:

> Hi Amin / Savannah hackers
>
> I am now in the process of relocating the code to the newly created
> repositories.
>
> It seems like write permission issues:
>
>       remote: abort: could not lock repository
>       health-federation-portal: Permission denied

Thanks for reporting this.  I did a quick cross-check of the permissions
of the new repositories I created for you with the older existing hg
repositories on Savannah, and spotted a few differences between them.
I've tried the following hoping to fix the permission issues:

cd /srv/hg/
for d in 
health-{hmis-client,fhir-server,thalamus,federation-portal,mygnuhealth}; \
  do chmod g+w "$d" && chmod g+s "$d"; done
for d in 
health-{hmis-client,fhir-server,thalamus,federation-portal,mygnuhealth}/.hg; \
  do chmod g+w "$d"; done
for d in 
health-{hmis-client,fhir-server,thalamus,federation-portal,mygnuhealth}/.hg/*; \
  do for f in "$d"; do chmod g+w "$f"; done; done

Basically, allowing members of the 'health' group to write to the
repository directories and updating the permissions of the existing
files in those repositories.  Roughly based on the steps mentioned on
https://www.mercurial-scm.org/wiki/MultipleCommitters.

Could you please try again and let me know if they're fixed now?

> BTW, now that we're into permission issues, this warning always shows
> up in the initial "health" dir. Maybe it might be a good idea to have
> another user other than "root".
>
>       remote: not trusting file health/.hg/hgrc from untrusted user
>       root, group health remote: not trusting file
>       /net/vcs/hg/health/.hg/hgrc from untrusted user root, group
>       health

So, from what I've seen, the repository directories on Savannah across
multiple version control systems (like git, hg, and cvs) are all owned
by the root user, and I would be hesitant to change that.  For the
specific case of mercurial, the warnings appears to be related to
https://www.mercurial-scm.org/wiki/Trust.  To try and sidestep this
warning, I've created /etc/mercurial/hgrc.d/trust.rc on the server, with
the following:

[trusted]
users = root

Which should tell mercurial that the root user is trustworthy for all
users, which makes sense to me (only Savannah hackers have root access
on the servers).  Let me know if this helps get rid of the warnings.

> Thank you!
> Luis

Cheers,
amin

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]