Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3323742
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:20:19+00:00 2026-05-17T23:20:19+00:00

I am using mercurial as part of my workflow process and it is working

  • 0

I am using mercurial as part of my workflow process and it is working well. I have one niggling problem though. When I pull from my central repository down to my Linux web server in order to make an upgrade, I’m doing it with the “root” user. That appears to assign the owner and group to “root” for any files that are new or changed.

Unfortunately I run into other difficulties with that, so I’m always having to go through and reset all the files to the proper group and owner (a non-root user on the web server).

Is there some way to get mercurial to do this automatically, or does someone have a fast way of doing it? I am using the shell and having to type

chown -R username /home/username

I try to do something similar with chgrp. The whole thing seems messy, and I suspect there’s a simpler way to accomplish what I need. Is there a way to set owner and group when pulling from a repository?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:20:20+00:00Added an answer on May 17, 2026 at 11:20 pm

    You should be pulling as you not as root and then you wouldn’t have that problem. However, if that’s infeasible for some reason you can always use an update hook to correct file permissions. In your repository’s .hg/hgrc file you’d put:

    [hooks]
    update = chown -R username:usergroup /home/username
    

    And that command will be automatically run after each hg update (or hg pull -u).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using mercurial, I've run into an odd problem where a line from one committer
I have a long standing problem: at work we're using mercurial as a DSCM,
Does this scenario work using mercurial? so if you have a central rep Central
I've been using Mercurial for some development lately and have been loving it. I'm
I am using Mercurial version control for my project. Everything like push , pull
We are working with severall people on the same project and are using Mercurial
I'm investigating using Mercurial in a corporate environment. The plan is to use central
Using Mercurial, we can commit one file by using hg commit file.rb or 1
Using Mercurial, say if I do an hg pull and hg up and now
Using Git or Mercurial, if the working directory is 1GB, then the local repository

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.