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

  • Home
  • SEARCH
  • 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 63777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:41:10+00:00 2026-05-10T18:41:10+00:00

I want to deploy my site on my web hosting package by doing a

  • 0

I want to deploy my site on my web hosting package by doing a checkout through subversion. I do not have SSH access to my hosting package, which is just a basic LAMP web hosting package, but I do know that there is an SVN client installed on the web server.

I was thinking of writing some sort of script (PHP or Shell) that can do different functions. Like a checkout, update, switch to another tag etc. and that I can call externally in some sort of fashion.

Any input on best practices, things to look out for and how to go about this is very much appreciated.

UPDATE: I have been using the following technique for the past couple of weeks now. I’ve carefully crafted (and well tested) a couple shell scripts that I can execute from cron through cPanel. Whenever cron has completed a job it will email me the console output of the job. this way I can monitor if all commands succeeded. Since I only do updates on the server and no commits, I haven’t run into any issues concerning Subversion. Of course, in my .htaccess files I have created a rule that will deny any access to the hidden .svn folders.

  • 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. 2026-05-10T18:41:11+00:00Added an answer on May 10, 2026 at 6:41 pm

    The good news is that svn is very easily scriptable, but the bad news is that you are likely to have a difficult time without shell access.

    If you do this without shell access, be careful of anything that can change a file in a directory under svn. This can lead to conflicts between working copy and latest version and block your updates. You might want to build in a revert command into your update script, and revert recursively before the update.

    The other choice would be to export rather than check out. You wouldn’t have the .svn directories, and you wouldn’t have to be concerned about files being conflicted. You might want to export into a clean directory rather than overwrite, since I think the svn export does not touch non-versioned files including files deleted through svn.

    The difficult part is that the web server’s userid probably does not have write permission to the directories you want to hit with your checkout. So it needs to run the svn commands as another user for write permissions and file ownership. I used suid-perl to change effective uid/gid, and call those perl scripts from the php. The Perl then calls the svn command with the correct identity. If you do need suid, then you’ll need to be able to change file permissions and set the suid bit. Maybe your FTP can set suid permissions, otherwise you’ll need a shell. The only other option which comes to mind (which is a bad idea) is to grant the web server write access to your entire directory.

    If the svn repository is on a separate machine, you will probably want to use svn+ssh. This could mean storing a key file or password on the web server. Make sure the permissions are correct on the key files, since ssh rejects them if they are readable to anyone other than the owner. Just to be safe, make sure the login on the subversion server can do nothing but access the svn repository.

    In your .htaccess files or httpd.conf you should block all access to .svn directories from anyone anywhere.

    I also keep my PHP updater page in a directory protected by password over SSL. It only has one action it can perform, which is updating the web directory to the latest revision from svn. It accepts no user input. If it did allow the user to choose a tag or revision, it would only accept tag selections from a list, or integer revision numbers. Those would be highly sanitized before use, and no user input would ever be used in a shell command or option.

    The main thing is to be careful of security when you have any PHP or externally accessible script execute a command which modifies data on the server.

    I think on a machine where you do not get shell access, you will have a lot of difficulty with permissions and file ownership. Unless you are strongly tied to this hosting provider, I would recommend upgrading to a provider who offers the tools to make your job easier. You’ll save yourself enough time that it will likely be worth the money.

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

Sidebar

Ask A Question

Stats

  • Questions 81k
  • Answers 81k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You do not need Session (or CallContext, or anything else),… May 11, 2026 at 4:34 pm
  • Editorial Team
    Editorial Team added an answer This happens when you have a mixture of Windows line… May 11, 2026 at 4:34 pm
  • Editorial Team
    Editorial Team added an answer I researched it a bit and came up with these… May 11, 2026 at 4:34 pm

Related Questions

I'm developing a site-specific Firefox extension. The official hosting/updating mechanism at addons.mozilla.org forces my
I have an ASP.NET web site, my machine has IIS7 running on Windows Vista
My server has both Subversion and Apache installed, and the Apache web directory is
I asked this Can I automate creating a .NET web application in IIS? a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.