The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

changing home directory for specific accounts

Discussion in 'General Discussion' started by junkiesnetwork, Jan 26, 2005.

  1. junkiesnetwork

    junkiesnetwork Registered

    Joined:
    Sep 22, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Here's our setup. We have a server with one hard drive in it. What we are trying to do is to have our clients have accounts in different directories. Similar to the rearrange feature.

    We would like to keep all the paying customers in /home as it is currently set up, but we are going to be offering free hosting for several people, and would like to have all the free accounts in a totally seperate directory. This could be /home/free_hosting/<username> or it could be /home2/<username> or even /home_free/<username>. However, we only have one hard drive. We currently use ModernBill for the billing software.

    Is there a way to make all of one type of packages (for instance a package called 'Free') have the users be created in a certain directory on our server? We would still need the paid accounts to be created in /home as they are now. I've looked at 'Default Home Directory' and 'Home Directory Prefix' under the server configuration, but these don't seem to be what I'm looking for.

    Any help with this would be greatly appreciated.

    Thanks.
     
  2. onegeek

    onegeek Registered

    Joined:
    Aug 18, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Good question

    I'd like to see if anyone has an answer to this question too. Mike
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Could be done with a postwwwacct script. When an account is created, postwwwacct is run afterwards, if it exists. That script could move the users directory and symlink to it's new location, but in most respects, it won't change much.

    The big question is, why do you want them put elsewhere?
     
  4. onegeek

    onegeek Registered

    Joined:
    Aug 18, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Basically, one of my clients wanted a master login for all of his sites. On our old server, he could log in and change directories within his own home directory to update his sites.

    His sites were owned by one userid on the old server.

    It's just that he doesn't want to change.... and who doesn't :)...if it's already working.

    Later on, man
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That's already possible. It's called addon domains. The addon domain function puts the new domain account in the main domains public_html directory. Each domain has it's own files (site contents) but they are all in the one account.
     
  6. onegeek

    onegeek Registered

    Joined:
    Aug 18, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Oh, thanks man. I appriciate your help. I need to get around to a training session. What do you charge? hah

    Mike
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada

    Never thought about doing that, but if the price is right, why not. ;)
     
Loading...

Share This Page