Update failed. Did you modify something in /root/mailinabox?

mymachine:/$ curl -s https://mailinabox.email/setup.sh | sudo bash
Updating Mail-in-a-Box to v69b . . .
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), 156 bytes | 156.00 KiB/s, done.
error: Your local changes to the following files would be overwritten by checkout:
management/mail_log.py
Please commit your changes or stash them before you switch branches.
Aborting
Update failed. Did you modify something in /root/mailinabox?
mymachine:/$

Same problem on both of my MiaB servers. I don’t remember editing management/mail_log.py. I can’t even log in as root on the second server; haven’t configured it with my own password.

Is this the file we had to correct a bug by fixing some character to | or something?

What can I do?

Kind of seems like it was modified though…

-rw-r–r-- 1 root root 6101 Apr 30 03:08 auth.py
-rwxr-xr-x 1 root root 23407 Apr 30 03:08 backup.py
-rwxr-xr-x 1 root root 5423 Apr 30 03:08 cli.py
-rw-r–r-- 1 root root 4449 Apr 30 03:08 csr_country_codes.tsv
-rwxr-xr-x 1 root root 26695 Apr 30 03:08 daemon.py
-rwxr-xr-x 1 root root 1084 Apr 30 03:08 daily_tasks.sh
-rwxr-xr-x 1 root root 47197 Apr 30 03:08 dns_update.py
-rwxr-xr-x 1 root root 1417 Apr 30 03:08 email_administrator.py
-rwxr-xr-x 1 root root 22087 Apr 30 03:08 mailconfig.py
-rwxr-xr-x 1 root root 29451 May 13 11:18 mail_log.py
-rw-r–r-- 1 root root 4412 Apr 30 03:08 mfa.py
-rwxr–r-- 1 root root 66 Apr 30 03:08 munin_start.sh

Go to that directory and run ‘git checkout’ and git should revert the changed file back to the original. Then try the update again

1 Like

While I really appreciate the advice, the main problem I have is that I don’t know where that directory is. I can’t get to it with knowledge of Ubuntu.
That is cd /management/ doesn’t work.

It it’s probably under your home (/home/ubuntu) directory … /home/ubuntu/mailinabox/management/backupy.py

I’ve been traveling and typing this on a bus, so I can’t confirm, but if memory serves, you need to run the git checkout command in the ‘/root/mailinabox’ directory

The solution was to login to root, cd mailinabox/management and then issue the command ‘git checkout mail_log.py’.
All is well now.

Thanks for the help.
Keith.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.