Comment 1 for bug 2003709

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for reporting this bug and trying to make Ubuntu better.

I tried to reproduce what you described in a Ubuntu Jammy container:

root@apache2-jammy:~# dpkg -l apache2
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
ii apache2 2.4.52-1ubuntu4.2 amd64 Apache HTTP Server
root@apache2-jammy:~# cat /tmp/foo
blah blah
root@apache2-jammy:~# file -m /etc/apache2/magic /tmp/foo
/etc/apache2/magic, 187: Warning: string modifier `B' invalid
/etc/apache2/magic, 402: Warning: string modifier `B' invalid
/etc/apache2/magic, 619: Warning: string modifier `B' invalid
/etc/apache2/magic, 624: Warning: string modifier `B' invalid
/etc/apache2/magic, 628: Warning: string modifier `B' invalid
/etc/apache2/magic, 629: Warning: string modifier `B' invalid
file: could not find any valid magic files!
root@apache2-jammy:~# wget
--2023-01-24 20:29:34--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13064 (13K) [text/plain]
Saving to: ‘magic’

magic 100%[==================>] 12.76K --.-KB/s in 0.001s

2023-01-24 20:29:35 (9.45 MB/s) - ‘magic’ saved [13064/13064]

root@apache2-jammy:~# file -m ./magic /tmp/foo
/tmp/foo: text/html

The file shipped in the Ubuntu package diverges from the upstream one. This requires extra investigation to understand why this was done. Adding this bug to our backlog.