#1 (permalink)  
Old 06-12-2009, 08:23 PM
broncha's Avatar
Registered User
 
Join Date: Feb 2009
Posts: 14
broncha is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-12-2009, 11:52 PM
Infopro's Avatar
Forum Moderator
 
Join Date: May 2003
Location: Pennsylvania
Posts: 3,498
Infopro is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-08-2009, 08:07 PM
broncha's Avatar
Registered User
 
Join Date: Feb 2009
Posts: 14
broncha is on a distinguished road
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-08-2009, 09:45 PM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,501
Spiral is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-09-2009, 11:53 AM
broncha's Avatar
Registered User
 
Join Date: Feb 2009
Posts: 14
broncha is on a distinguished road
Thanks for that Spiral but I need to copy the htaccess to the folders that already exists in /home.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-09-2009, 07:01 PM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,501
Spiral is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is POST Content-Length defined? anoetic cPanel and WHM Discussions 1 10-01-2008 05:38 AM
Value too large for defined data type linux.newbie cPanel and WHM Discussions 0 12-15-2007 12:41 AM
your vendor has not defined SSLeay ... Quanntum cPanel and WHM Discussions 0 11-08-2007 01:57 PM
Value too large for defined data type SiMka cPanel and WHM Discussions 1 06-10-2005 07:11 AM
User Defined DNS Entries bpat1434 cPanel and WHM Discussions 2 03-11-2005 01:19 AM


All times are GMT -5. The time now is 02:20 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc