subdomain creation problem

I have a big problem with Virtualmin GPL 3.703 - when domain owner is logged in Virtualmin he cannot create subdomains with his user/group. It is created with user root and group root.
Can anyone help?
Thanks in advance.

Hrm, that seems odd… so you’re saying that if a Virtual Server owner creates a new Sub-Server, the files it creates – such as “public_html”, are owned as root?

Can you show the output of an “ls -la” in the directory you’re seeing that in?

Also, if you use a different Virtual Server owner, do you still have the same problem when creating Sub-Servers, or is it just the one owner?


here is the output:

drwxr-x---  7 rodina-lan rodina-lan 4096 Jul 19 15:48 .
drwxr-x--- 10 rodina-lan rodina-lan 4096 Jul  2 09:27 ..
drwxr-xr-x  2 root       root       4096 Jul 19 15:48 asd
lrwxrwxrwx  1 rodina-lan rodina-lan   31 Jul  2 09:27 awstats-icon -> /usr/share/awstats/wwwroot/icon
drwxr-xr-x  5 rodina-lan rodina-lan 4096 Jun 27 19:36 goiko
lrwxrwxrwx  1 rodina-lan rodina-lan   31 Jul  2 09:27 icon -> /usr/share/awstats/wwwroot/icon
-rw-r--r--  1 rodina-lan rodina-lan   26 Jun 30 14:45 index.html
drwxr-xr-x 14 rodina-lan rodina-lan 4096 Jun 12 13:10 obiavi
-rw-r--r--  1 rodina-lan rodina-lan  965 Jun  7  2002 pagerror.gif
drwxr-xr-x  9 rodina-lan rodina-lan 4096 Jun 30 14:54 ss
drwxr-xr-x  2 root       root       4096 Jul 19 15:26 wer

asd and wer folders are test subdomains from rodina-lan user.

I tried to create a sample domain owner - it is the same - users, groups are created normaly, but subdomain folders are owned by root.

This sounds like a bug. Where did those “asd” and “wer” directories come from though? Did the user create them, or were they in the /etc/skel directory?

As root i create a top level server called “”.
Then I login as user somedomain in virtualmin. Then create a sub-domain and when i go to “Webmin Modules>File manager” and look into “public_html” there is a folder (for sub-domain) called with name of subdomain, but with owner root. I don’t know when this happened, just noticed this today.
Before 2-3 weeks there was no such problem.

Ok, I found the source of this bug and will fix it in the next Virtualmin release…

The work-around till then is to create these as sub-servers (which can still be DNS sub-domains).

Yes, sub-servers are created properly. I’ll wait til next release, but i prefer to know how to do this to work right. If there is a possibility to fix things alone…

Let me know if you’d like a patch to fix this sooner…

Yes, i want a solution soon, but don’t want to push you. Is the next release coming soon ?

Ok, you can edit virtual-server/ under the Webmin root directory, and change line 130 to :

&make_dir_as_domain_user($_[0], $sd, 0755);

Then run /etc/webmin/restart

You guys are really fast! Nice job!
Best wishes,