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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:41:09+00:00 2026-05-25T06:41:09+00:00

I’m attempting to build an application in PHP to help me configure new websites.

  • 0

I’m attempting to build an application in PHP to help me configure new websites.

New sites will always be based on a specific “codebase”, containing all necessary web files.
I want my PHP script to copy those web files from one domain’s webspace to another domain’s webspace.
When I click a button, an empty webspace is populated with files from another domain.
Both domains are on the same Linux/Apache server.

As an experiment, I tried using shell and exec commands in PHP to perform actions as “root”.
(I know this can open major security holes, so it’s not my ideal method.)
But I still had similar permission issues and couldn’t get that method to work either.

But I’m running into permission/ownership issues when copying across domains.
Maybe a CGI script is a better idea, but I’m not sure how to approach it.

Any advice is appreciated.
Or, if you know of a better resource for this type of information, please point me toward it.
I’m sure this sort of “website setup” application has been built before.

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-25T06:41:09+00:00Added an answer on May 25, 2026 at 6:41 am

    i’m also doing something like this. Only difference is that i’m not making copies of the core files. the system has one core and only specific files are copied.

    if you want to copy files then you have to take in consideration the following:

    1. an easy (less secured way) is to use the same user for all websites

    2. otherwise (in case you want to provide different accesses) – you must create a different owner for each website. you must set the owner/group for the copied files (this will be done by root).

    3. for the new website setup:
      either main domain will run as root, and then it will be able to execute a new website creation, or if you dont want your main domain to be root, you can do the following:
      create a cronjob (or php script that runs in a loop under CLI), that will be executed by root. it will check some database record every 2 minutes for example, and you can add from your main domain a record with setup info for new hosted website (or just execute some script that gains root access and does it without cron).

    4. the script that creates this can be done in php. it can be done in any language you wish, it doesn’t really matter as long as it gets the correct access.

    in my case i’m using the same user since they are all my websites. disadvantage is that OS won’t create restrictions, my php code will (i’m losing the advantage of users/groups permissions between different websites).

    notice that open_basedir can cause you some hassle, make sure you exclude correct paths (or disable it).

    also, there are some minor differences between fastCGI and suPHP (i believe it won’t cause you too much trouble).

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.