Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    1

    Default changing home directory for specific accounts

    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. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    3

    Default Good question

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

  3. #3
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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?
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  4. #4
    Registered User
    Join Date
    Aug 2004
    Posts
    3

    Default

    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. #5
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  6. #6
    Registered User
    Join Date
    Aug 2004
    Posts
    3

    Default

    Oh, thanks man. I appriciate your help. I need to get around to a training session. What do you charge? hah

    Mike

  7. #7
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Quote Originally Posted by onegeek
    Oh, thanks man. I appriciate your help. I need to get around to a training session. What do you charge? hah

    Mike

    Never thought about doing that, but if the price is right, why not.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

Similar Threads & Tags
Similar threads

  1. Home directory not available
    By scifimeshes in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-15-2011, 12:15 PM
  2. Different /home directory for certain accounts?
    By bronco92 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-08-2010, 08:06 PM
  3. Migrate accounts without home directory.
    By vajjra in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 03-04-2009, 09:15 AM
  4. Changing Home Directory
    By hotsos in forum New User Questions
    Replies: 3
    Last Post: 07-28-2006, 11:28 PM
  5. Changing FTP home directory
    By clinch in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-08-2006, 09:10 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube