mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #1810] Error while installing modoboa #1423
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1423
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IndexOutOfMJ on GitHub (Dec 28, 2019).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1810
Hey,
I currently try to install modoboa.
Impact version
Steps to reproduce
sudo ./run.py mydomain.eu
Current behavior
Your mail server will be installed with the following components:
modoboa automx amavis clamav dovecot nginx razor postfix postwhite spamassassin uwsgi radicale opendkim
Do you confirm? (Y/n)
The process can be long, feel free to take a coffee and come back later ;)
Starting...
Generating new certificate using letsencrypt
Installing amavis
Installing spamassassin
Installing razor
Installing clamav
Installing modoboa
>Traceback (most recent call last): File "./run.py", line 136, in <module> main(sys.argv[1:]) File "./run.py", line 120, in main scripts.install("modoboa", config, args.upgrade) File "/root/modoboa-installer/modoboa_installer/scripts/__init__.py", line 22, in install getattr(script, appname.capitalize())(config, upgrade).run() File "/root/modoboa-installer/modoboa_installer/scripts/base.py", line 155, in run self.post_run() File "/root/modoboa-installer/modoboa_installer/scripts/modoboa.py", line 250, in post_run self._deploy_instance() File "/root/modoboa-installer/modoboa_installer/scripts/modoboa.py", line 162, in _deploy_instance sudo_user=self.user, cwd=self.home_dir) File "/root/modoboa-installer/modoboa_installer/utils.py", line 68, in exec_cmd process = subprocess.Popen(cmd, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 390, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory: '/srv/modoboa'I don't think that should happen.
@tonioo commented on GitHub (Jan 6, 2020):
@IndexOutOfMJ On with distribution are you trying to install modoboa? Have you tried using the --debug option?
@jasonhensler commented on GitHub (Feb 24, 2022):
I'll leave this for anyone else whom runs into the same issue as it was not immediately apparent as to the cause. I ran into the same issue on a fresh Debian 11 install when running as root (not sudo). I found that this would fail with the error FileNotFoundError: [Errno 2] No such file or directory: '/srv/modoboa'. When using --debug I could see the install failed silently in the background to find the service command and then spat out the error [Errno 2] No such file or directory: '/srv/modoboa'.
The issue was that the PATH variable did not include sbin paths, ie /sbin, /usr/sbin, /usr/local/sbin. By adding these to PATH I was able to install without issue, ie export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin.
@ecsgh commented on GitHub (May 14, 2022):
I have exactly the same error. I am also using Debian 11.
Programs in sbin, such as useradd are not found.
But if I change to root with "su -", the minus sign is important, it finds programs under /sbin/ and the installer runs through.
Is this a normal behavior, or a bug in Debian or a bug in the installer?
@tonioo commented on GitHub (May 18, 2022):
@ecsgh It's a normal behaviour. The - sign (or -i option with sudo) tells the command to load the target user environment variables. If you do not specify those options, then the environment of the original user is used. With a regular user, the PATH variable won't include /sbin and /usr/sbin folders.
@ecsgh commented on GitHub (May 18, 2022):
Yes I know what "-" does.
But I think that should be taken into the documentation, because as it currently stands in it, the installation just does not work.