2FAuth fails to update (at least when no update) #1284

Closed
opened 2026-02-05 00:10:40 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ryosoftware on GitHub (Jul 15, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

2fauth

📂 What was the exact command used to execute the script?

update

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

When updating, and no update found, the updater fails to restore data
The backup is created at /opt/2fauth-backup via a mv command, the 2fauth app is not downloaded due to no updates, then the backup is not restored due to the /opt/2fauth folder doesn't exists.
In addition, the script doesn't restores the database

🔄 Steps to reproduce the issue.

Exec "update"

Paste the full error output (if available).


|__ \ / / | __ __/ // /
_/ // / / /| |/ / / / __/ __
/ __// __/ / ___ / /
/ / /
/ / / /
/// // |_,/_// //

Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://mirror.mariadb.org/repo/12.0.1/debian bookworm InRelease
Hit:5 https://packages.sury.org/php bookworm InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
✔️ Backup Created
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (12.0-1).
gnupg2 is already the newest version (2.2.40-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'php8.3-common' instead of 'php8.3-ctype'
Note, selecting 'php8.3-common' instead of 'php8.3-fileinfo'
php8.3 is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-bcmath is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-cli is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-curl is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-gd is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-intl is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-mbstring is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-opcache is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-readline is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-xml is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-zip is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-common is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-fpm is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
php8.3-mysql is already the newest version (8.3.23-1+020250703.64+debian121.gbp5e3ea4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
✔️ Setup PHP 8.3
✔️ Patched /etc/php/8.3/cli/php.ini
✔️ 2fauth is already up-to-date (v5.6.0)
mv: cannot move '/opt/2fauth-backup/.env' to '/opt/2fauth/.env': No such file or directory

[ERROR] in line 52: exit code 0: while executing command mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env"

🖼️ Additional context (optional).

No response

Originally created by @ryosoftware on GitHub (Jul 15, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? 2fauth ### 📂 What was the exact command used to execute the script? update ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. When updating, and no update found, the updater fails to restore data The backup is created at /opt/2fauth-backup via a mv command, the 2fauth app is not downloaded due to no updates, then the backup is not restored due to the /opt/2fauth folder doesn't exists. In addition, the script doesn't restores the database ### 🔄 Steps to reproduce the issue. Exec "update" ### ❌ Paste the full error output (if available). ___ _________ __ __ |__ \ / ____/ | __ __/ /_/ /_ __/ // /_ / /| |/ / / / __/ __ \ / __// __/ / ___ / /_/ / /_/ / / / /____/_/ /_/ |_\__,_/\__/_/ /_/ Hit:1 http://security.debian.org bookworm-security InRelease Hit:2 http://deb.debian.org/debian bookworm InRelease Hit:3 http://deb.debian.org/debian bookworm-updates InRelease Hit:4 http://mirror.mariadb.org/repo/12.0.1/debian bookworm InRelease Hit:5 https://packages.sury.org/php bookworm InRelease Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ✔️ Backup Created Reading package lists... Done Building dependency tree... Done Reading state information... Done lsb-release is already the newest version (12.0-1). gnupg2 is already the newest version (2.2.40-1.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'php8.3-common' instead of 'php8.3-ctype' Note, selecting 'php8.3-common' instead of 'php8.3-fileinfo' php8.3 is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-bcmath is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-cli is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-curl is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-gd is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-intl is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-mbstring is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-opcache is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-readline is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-xml is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-zip is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-common is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-fpm is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). php8.3-mysql is already the newest version (8.3.23-1+0~20250703.64+debian12~1.gbp5e3ea4). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ✔️ Setup PHP 8.3 ✔️ Patched /etc/php/8.3/cli/php.ini ✔️ 2fauth is already up-to-date (v5.6.0) mv: cannot move '/opt/2fauth-backup/.env' to '/opt/2fauth/.env': No such file or directory [ERROR] in line 52: exit code 0: while executing command mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env" ### 🖼️ Additional context (optional). _No response_
OVERLORD added the bug label 2026-02-05 00:10:40 +03:00
Author
Owner

@MickLesk commented on GitHub (Jul 15, 2025):

why do you execute an update, if you know, there is no update available? It's such an unnecessary fix with extra deps, but apparently it has to be done.

@MickLesk commented on GitHub (Jul 15, 2025): why do you execute an update, if you know, there is no update available? It's such an unnecessary fix with extra deps, but apparently it has to be done.
Author
Owner

@ryosoftware commented on GitHub (Jul 15, 2025):

I have tried it to check how it works.
Aparently the updater detects and update (installed version is 5.6.0 but latest version is v5.6.0) and the update starts, but the process fails.
This is a updater bug. Isn't acceptable to have to run the updater only if an update is availble, in my opinion.

@ryosoftware commented on GitHub (Jul 15, 2025): I have tried it to check how it works. Aparently the updater detects and update (installed version is 5.6.0 but latest version is v5.6.0) and the update starts, but the process fails. This is a updater bug. Isn't acceptable to have to run the updater only if an update is availble, in my opinion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1284