Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member broncha's Avatar
    Join Date
    Feb 2009
    Location
    Kathmandu,Nepal
    Posts
    32

    Default Pre defined folders in public_html

    Hi Folks

    I was wondering if this can be done somehow:

    If we could predefine few folders to be created automatically into the public_html folder like images and deny server listing(automatically) for that folder when a new account is created from WHM?

    This could be really helpfull.

    Thanks

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,165
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Sure. add them to the /cpanel3-skel/ directory of the reseller that creates the accounts, or, add them to the /root/cpanel3-skel/ if root creates the accounts.

  3. #3
    Member broncha's Avatar
    Join Date
    Feb 2009
    Location
    Kathmandu,Nepal
    Posts
    32

    Default

    Hi InfoPro

    Thanks for that update.
    One thing.. Can u help me with some kinda script to iterate through the account folders in /home and copy a .htaccess file to the public_html folder?

  4. #4
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by broncha View Post
    Hi InfoPro

    Thanks for that update.
    One thing.. Can u help me with some kinda script to iterate through the account folders in /home and copy a .htaccess file to the public_html folder?
    If that's the same for each account! You can skeleton copy that too!

    If you need to customize it, you can create a postacct script
    or other hooked script to update things after the account is built.

  5. #5
    Member broncha's Avatar
    Join Date
    Feb 2009
    Location
    Kathmandu,Nepal
    Posts
    32

    Default

    Thanks for that Spiral but I need to copy the htaccess to the folders that already exists in /home.

  6. #6
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by broncha View Post
    Thanks for that Spiral but I need to copy the htaccess to the folders that already exists in /home.
    Option A) Copy the .htaccess from /home to the skeleton folder

    *** Incidentally, by having .htaccess in /home, it is already automatically
    active for every account on your server even without copying it to the
    account because it is on a higher directory level for the account path

    Apache reads /home, /home/(user), /home/(user)/public_html, etc.
    when searching for .htaccess files and reads them in order as it
    comes to them so any .htaccess in /home is already read by Apache
    and used as the default .htaccess for the entire server



    Option B) Create a /scripts/wwwacct script to copy the file

    The script, /scripts/wwwacct, if it exists is executed automatically
    after any new web hosting account is created and details regarding
    the new hosting account are passed as command line arguments
    to the script. More details about how /scripts/wwwacct works
    and how to use it can be found on Cpanel's developer site.
    Last edited by Spiral; 07-09-2009 at 07:03 PM.

Similar Threads & Tags
Similar threads

  1. Where is POST Content-Length defined?
    By anoetic in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-01-2008, 05:38 AM
  2. your vendor has not defined SSLeay ...
    By Quanntum in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-08-2007, 01:57 PM
  3. Value too large for defined data type
    By SiMka in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-10-2005, 07:11 AM
  4. Problem - no dns master defined
    By pingo in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-25-2004, 10:20 PM
  5. email and user-defined passwords
    By cyanide in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-19-2004, 03:52 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube