Oh, yeah, note that the ENV variables are slightly different in commands called outside of Virtualmin–click on any of the options to see the substitution format. You’d want $VIRTUALSERVER_DOM:
mkdir /var/log/hosting/$VIRTUALSERVER_DOM
But I should also warn you that none of the other tools are going to have any clue where this stuff is. Webalizer, AWstats, etc. You probably really don’t want to do this. Backups also won’t know about your change.
Hmm…If that’s the case, then maybe Jamie made it a lot smarter than I expected (I believe log rotation is configured in the same way that the other stuff is–so maybe Virtualmin does notice the change…that’d be pretty slick, but I think I’d still be surprised if it is working that way!).
Anyway, I can’t think of a good way to go about getting them outside of the scope of quotas. Most people struggle to figure out ways to make sure everything is covered by quotas, and not vice-versa! A symbolic link might do it, but that’d also probably be tricky. Might be worth a try–at least then you can be reasonably confident that everything is going to work as usual, but the actual data will be stored on the other partition.
If the log file is owned by the same user quota is still enforced.
I’m assuming it’s on a different partition, which takes it out of control of quotas. We do this trick for Dovecot index/control files, now, in a default install…if the /var/lib/dovecot directory is on a different partition from home, Virtualmin will setup those files to live there (which makes it impossible for the mailbox to become inaccessible due to quota being reached).
Debian minimal installs do NOT partition servers correctly – as the default only 2 partitions are created - /root and / - so no matter where you have files they are ALWAYS quota counted.
Debian minimal installs do NOT partition servers correctly -- as the default only 2 partitions are created - /root and / - so no matter where you have files they are ALWAYS quota counted.
And, that’s not actually all that terrible.
Most folks who are using quotas want quotas to apply to everything (except the Dovecot index and control files…but Dovecot in newer versions handles problems with these files sanely without the “different partition” workaround–the version included in Debian 4.0 almost certainly handles quota overage sanely, though I haven’t tested it).
But, yeah, if you want to do anything fancy related to not counting certain things in quotas, you do have to have a partition on which to put those non-quota items, and that’s not always what happens by default.
But the ${DOM} subdirectory isn’t. I guess you could create it using a “Command to run before” (found in the Module Configuration under “Actions upon server and user creation”).
But the ${DOM} subdirectory isn’t. I guess you could create it using a “Command to run before” (found in the Module Configuration under “Actions upon server and user creation”).
But the ${DOM} subdirectory isn’t. I guess you could create it using a “Command to run before” (found in the Module Configuration under “Actions upon server and user creation”).
But the ${DOM} subdirectory isn’t. I guess you could create it using a “Command to run before” (found in the Module Configuration under “Actions upon server and user creation”).
But the ${DOM} subdirectory isn’t. I guess you could create it using a “Command to run before” (found in the Module Configuration under “Actions upon server and user creation”).
But the ${DOM} subdirectory isn’t. I guess you could create it using a “Command to run before” (found in the Module Configuration under “Actions upon server and user creation”).
But the ${DOM} subdirectory isn't. I guess you could create it using a "Command to run before" (found in the Module Configuration under "Actions upon server and user creation").
Thank You!
I’ve made a little shell script that creates the appropriate directories and log files and now it works like a charm.