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 3221214
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:51:02+00:00 2026-05-17T15:51:02+00:00

In my research, I found some concern around deploying an online PHP application while

  • 0

In my research, I found some concern around deploying an online PHP application while leaving its “.hg” folder or “.svn” folders in place on the production server. Unfortunately, I was not able to find a clear explanation as to why this is a concern. I would like to better understand this security risk.

It seems to me that you don’t want these folders visible any more than you want the contents of the PHP files displayed. Wouldn’t the solution be to configure the web server to not serve the “.hg” directory? Does the security concern run deeper than this? I really don’t know. Your assistance with this is greatly appreciated!

If it is helpful, the reason I want to keep version control on the server’s production repository is the following:

  • Faster deployment from Staging (vs. doing a fresh copy per deploy)
  • Easy and fast rollback capability
  • The ability to verify that production remains unchanged (via hg st)

Alternatives are welcome.

Thanks!

  • 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-17T15:51:03+00:00Added an answer on May 17, 2026 at 3:51 pm

    Indeed, if one could rely on not serving the .svn / .hg directories by default, it would be no problem. As it is, someone (newbee / new develop / experienced on on a bad day) makes a little change that destroys those settings, and as ‘nothing goes wrong’ does not notice that the protection is gone. Voilà, your source code open to the world, with possibly even stored passwords & secrets. It’s not that something will go wrong with the proper settings, it’s that with a minor, easily glossed over alteration, they could go wrong, so why not play it safe?

    On a tightly controlled release process, I find it easier to export certain branches / tags to certain folders, and a switch to a newer branche / tag that has survived testing is just changing the document root from /path/project/release-123 to /path/project/release-124 (making it just as easy, maybe even quicker, to switch back to release-123 may the need be there). If you have a release process with more a stream of small changes & bugfixes, working with exports can indeed be a pain, but the added security is worth it in my opinion.

    On development servers, everything is already filtered on (VPN-)IPs or certificates, so there I employ a checkout with ‘the latest & greatest` trunk version with the version control dirs without any problem.

    edit:

    Both Mercurial and Subversion nowadays keep there data in a single .hg/.svn dir in the top level. As one would normally make a checkout where most of the files are outside the document root (and the document root is likely a subdirectory further down), this is fine. Just make sure your version control directories are not in a reachable folder for the webserver inside the document root, and you can keep checkouts rather then exports there without much problems.

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

Sidebar

Related Questions

I've done some research into server push with javascript and have found the general
I'm doing some research into using log4net, and I found the IObjectRenderer interface interesting.
I'm doing some research on the feasibility of an iPhone application, and can't find
I'm doing some research for my end of degree project: a multiplattform application developed
Has anyone found any documentation or research about what data is transfered to Google
I am doing some research on Unicode for a white-paper I am writing. Does
I've done some research on using tags from social bookmarking sites for web search
I'm doing some research into databases and I'm looking at some limitations of relational
I've done some research and I can't really find a preferred way to do
I was reading a research paper about Haskell and how HList is implemented and

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.