Subdomains do not copy /etc/skel

4 posts / 0 new
Last post
#1 Fri, 05/01/2009 - 09:00
DanielJabbour

Subdomains do not copy /etc/skel

Hi,

I have some files in /etc/skel that I would like copied into every home, regardless if it is a sub-server or a top-level server in virtualmin. This is due to php suexec configuration, specifically I need a php.ini copied. I noticed virtualmin doesn't copy /etc/skel for sub-servers. Is there any way to have it do so? What about just adding some script to be run when a subserver is created? Any suggestions/tips would be appreciated. Thanks,

Daniel Jabbour

Fri, 05/01/2009 - 09:29
andreychek

Hi Daniel,

The /etc/skel dir is copied in by the useradd command, as part of creating the Virtual Server owner's account.

It's not copied into Sub-Servers, as no new user accounts are being created, so useradd isn't being called.

If you're using the Pro version, the system php.ini should be automatically copied in already (if it's not, that's a bug!)

If you're using the GPL version, you might look into System Settings -> Module Config -> Actions upon server and user creation. You could tweak "Command to run before making changes to a server" to do what you're after.
-Eric

Fri, 05/01/2009 - 11:54 (Reply to #2)
DanielJabbour

Hi,

Thanks for your quick reply. I am using the GPL version. I have looked at "Actions upon server and user creation," however, I have a question. If my script was to say, copy the necessary files into the domain, how would I only have the script run on creation of a domain. It would seem that this script "Command to run before making changes to a server" is run regardless of a add/delete/modify. Is there some environment variable to know which is occurring? Thanks,

Daniel

Sat, 06/11/2011 - 10:54
phillip1983

Hi All,

i am having some problems with copying the /etc/skel dir too ... if i create a server with no virtual ip address then i can see the index.htm page i have created in /etc/skel/public_html but its not displayed when you type in domain.com/index.htm

however if i create a domain with a new virtual IP address and type in domain.com/index.htm the page is displayed and i can see it etc ???

Topic locked