Hello.
I am trying to install virtualmin on fresh Ubuntu 24. Install script VER=7.4.0. It shows:
Failed to query Postfix config command to get the current value of parameter virtual_alias_maps: /usr/sbin/postconf: fatal: open /etc/postfix/main.cf: No such file or directory postfix/postfix-lib.pl (line 138)
Error
-----
Failed to query Postfix config command to get the current value of parameter virtual_alias_maps: /usr/sbin/postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postfix/postfix-lib.pl (line 138)
/etc/postfix/main.cf is not part of postfix package.
At first it failed at sa-compile because x86_64-linux-gnu-gcc was executable by root only. The install script should check if gcc is executable by non-root user IMHO if it tries to use it.
I have changed /usr/bin/x86_64-linux-gnu-gcc-13 ownership and restarted it, which results in postfix error. Running ./install.sh -u and then ./install.sh again still shows the same postfix error.
And, the install script doesn’t need to check if gcc is executable by a non-root user, because it is not a problem that can occur on a freshly installed supported OS.
I don’t know what’s wrong with your system, but it’s absolutely not an issue for the installer to address. You just need to start with a freshly installed, supported OS.
If you find yourself changing permissions on system files, something has gone horribly wrong, entirely unrelated to the Virtualmin installer.
That’s the installer version, which is independent of the Virtualmin version.
But, it’s actually an older. Not sure where they found it.
@rch7 why are you using an old version of the install script? Current version is 7.5.2.
That’s unrelated to the problems you’re having, which are a system-level issue outside the control of the installer, but still…best to use the latest version. Older versions probably have bugs we’ve already fixed.
I was using http://software.virtualmin.com/gpl/scripts/install.sh
I see now the link has changed but the old one is still working, that is how I ended up with 7.4.0.
Either way, the postfix error is exactly the same on VER=7.5.2 installer.
Any ideas about /etc/postfix/main.cf? It’s as fresh install as it can be, nothing was done to it other than webmin install by hosting company (hivelocity if it matters).
IMHO we should be well past Windows 95 approach of reinstalling the OS over and over again to make userland work.
As for the gcc permissions, it’s common to have them restricted to “compiler” group like on Redhat, or to root to reduce exploit risk. Maybe the hosting company changed it to root only at deployment time, I don’t know. Either way you can’t just assume C compiler will be allowed for non-root user, either it’s virtualmin or/and Ubuntu package issue. Yes I did run install as root.
Seriously. His rants against hosting companies doing this is legendary. Virtualmin installs it’s own version of Webmin. I suspect this is your problem.
The only way we can be on the same page to ensure you have a good install is a totally fresh install. This works out of the box for probably thousands. Problem is, you don’t really have a fresh install. OS ONLY. NOTHING ELSE.
Yes, as I said, the problems you’re having are unrelated to the installer. They are problems with your system.
I don’t know what’s wrong with your system, but something is.
For whatever reason, Postfix failed to install, or installed incompletely for some reason. So, what happens when you try this on your system:
apt install postfix postfix-pcre
I can assume it on a freshly installed supported OS.
We only support installation on a freshly installed, supported, OS. We test our installer quite heavily on supported operating systems. The problems you’re having are unrelated to the installer. Something is wrong with your system. Something about it is not like a freshly installed supported OS. I don’t know what’s changed from a default install, but the packages that would be installed by our installer do not require you to mess around with permissions.
I will also point out that we don’t run or use sa-compile. That’s happening as part of the installation of the sa-compile package, which is provided by your OS. If it doesn’t work, it’s out of our control (but it does work on a freshly installed supported OS).
Aw, jeez. I did miss that detail. Of course the system is messed up. Hosting providers are absolutely disastrously bad at preinstalled systems. I don’t know why, but they are incapable of installing anything correctly no matter how simple it is, and they’re going to break some other stuff in the process, too.
@rch7 please start with a freshly installed, supported, OS. Do not get the “preinstalled with Webmin” image. Get a freshly installed, supported, OS. Your hosting provider is not capable of installing software. I don’t know why. So don’t let them break your system before you even start.
I’m beginning to think they do this on purpose to intentionally make people think Webmin or Virtualmin is buggy and unreliable. It’s really easy to install, if you follow the docs. So, I can’t come up with an explanation for why every time someone says, “I got an image with Webmin/Virtualmin preinstalled” it’s always a mess. We’ve never seen that mentioned when the problem wasn’t related to something the hosting provider did weird.
Absolutely not. Installing Webmin does nothing to the system. It makes no changes to configuration files or anything else. It depends on a few other packages, but Postfix is not one of them.
But, if you let your hosting provider start messing about on the system, they are going to mess something up. They are incapable of doing otherwise.
So, we are back to: Start with a freshly installed, supported OS. Not a preconfigured image with whatever random stuff your hosting provider decided to do to the OS before calling it a “Webmin preinstalled” image.
Edit: I’ve marked this as the solution. Because we now know why it isn’t working. It’s not a freshly installed supported OS. Running the installer on a freshly installed supported OS will resolve this issue.
Thanks for that clarification. It’s been a long time since I’ve worked with just Webmin but, given its’ purpose, makes perfect sense. Probably a lot of us here have a little trouble drawing the line between WM and VM because we use the integrated product.
As an aside, I’m actually surprised sa-compile is in a default install. We don’t depend on it and we don’t use it, partly because it does require a compiler, which I don’t recommend on web servers or shared hosting systems in the general case.
It must be a soft dependency of the spamassassin package (a Recommended package). On my test system I’m able to remove it without complaint.
That doesn’t change the fact that these issues indicate a messed up system and the installer should not be expected to work on a system that has been modified in the ways OP is seeing (because it’s not a freshly installed supported OS). But, it is an interesting aside and thing maybe we ought to think about.
sa-compile is a tool that makes SpamAssassin rules processing a little more efficient, because it compiles them into a binary executable, rather than Perl code. It’s not a huge difference (because it’s still got a whole Perl compatible regex engine and runtime in the resulting binary, and Perl is quite fast and efficient at this task, relatively speaking), and probably would only provide a notable improvement on a system processing a lot of mail, like tens of thousands of emails in a day.
Anyway, we don’t use it. It’s not part of our stack nor is it part of the upstream SpamAssassin distribution. It’s just being installed because somebody at Debian/Ubuntu thought it was neat and added it as a Recommended package to the SpamAssassin package. I question that judgment.