Manual backups failing on 2.302

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 2.302
Virtualmin version 7.30.4
Webserver version Apache 2.4.62
Related packages webmin

I’m having a bit of an odd issue since updating to Webmin 2.302 on my server running Virtualmin 7.30.4. When manually backing up a server via the Virtualmin UI (via Backup and Restore → Backup Virtual Servers) with the destination as Download via link, I hit a permissions error where the backup script cannot open the *.info file to create the final backup archive.

Fatal Error!
Backup failed : Failed to open /tmp/.webmin/account:domain.com+all-domains-2025-03-13-13-57.tar.gz.info for writing : Permission denied

Seems to work on 2.202. Files in tmp are owned by the appropriate user during the backup and seem to have the correct permissions. Not sure what logs beyond the typical webmin logs I should be looking at. Scheduled backups as root are working as expected.

Do I have a configuration error or some norm I’m not following that I should be and 2.302 has just called me out on it? Appreciate any insight!

What are the permissions on /tmp and /tmp/.webmin if you run:

ls -ld /tmp/.webmin
ls -ld /tmp

Also, are there any related errors in /var/webmin/miniserv.error that could be useful?

1 Like

Hey @Ilia! Thanks for replying :smile:

Here’s the permissions for /tmp and /tmp/.webmin

ls -ld /tmp/.webmin

drwxr-xr-x 2 root root 12288 Mar 13 16:15 /tmp/.webmin
ls -ld /tmp

drwxrwxrwt 12 root root 12288 Mar 13 16:15 /tmp

Only error in /var/webmin/miniserv.error is the one outputted to the web interface when it tries to create that final backup archive (i.e. the “failed to open for writing” error). No errors before this line.

/virtual-server/backup.cgi/backup.tgz : Failed to open /tmp/.webmin/account:domain-com+all-domains-2025-03-13-13-57.tar.gz.info for writing : Permission denied

And, what is the output of:

df -H

and

lsattr -d /tmp /tmp/.webmin
df -H

Filesystem      Size  Used Avail Use% Mounted on
udev            2.9G     0  2.9G   0% /dev
tmpfs           593M   18M  576M   3% /run
/dev/sda2       588G  189G  370G  34% /
tmpfs           2.9G  2.3M  2.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda1       2.0G  103M  1.8G   6% /boot
tmpfs           593M     0  593M   0% /run/user/0
lsattr -d /tmp /tmp/.webmin

-----------I--e------- /tmp
-----------I--e------- /tmp/.webmin

This might be it, given the immutable flag?

@dwightpro Ah, okay—thanks! I could reproduce this issue logged in as domain owner!

@Jamie, do you have any idea what started causing it?

1 Like

Oh phew, it’s just me. :stuck_out_tongue:. Sorry, I should’ve clarified that I was backing up logged into an account and not under root.

I appreciate all your time (both on this issue, and on the product itself). If I can help narrow it down in any way, I’m here!

There were some recent changes in Webmin to surface file IO errors that were previously hidden - perhaps that could be the cause?

Yeah, perhaps—I’m looking at it now…

Actually, it wasn’t that—this patch is the real culprit.

1 Like

Ok I see my bug - the fix is here : Check the UID that is used for file operations · webmin/webmin@b17df99 · GitHub

We will probably do a new Webmin release shortly…

2 Likes

You guys are quick! Thanks for the attention and looking into this. Amazing as always.