Opened 4 years ago

Closed 20 months ago

#13574 closed Bug Report - General (Trac EOL)

packaging/deb/debian - multiple issues ubuntu 20.04 focal

Reported by: Mike Bibbings Owned by: Bill Meek
Priority: minor Milestone: 31.1
Component: Packaging Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


Attempting to install mythtv from ppa:mythbuntu/31 on Ubuntu 20.04 focal daily build fails. I understand that focal is still in development.

I get a permission denied error at line 54 (cat $INPUT > $NEW) of mythtv-common.postinst.

Something in focal has changed, don't know if it is a bug, or tightening of code somewhere, so that something that previously worked, but should not have, now fails. The same code on Ubuntu 18.04 LTS is fine.

temporarily changing to


allowed it continue, so something is happening due to > redirection (works fine on Ubuntu 18.04 LTS)

There is also a problem with mythtv-database.postinst as it fails to configure database user mythtv is not setup. mysql 8 is being installed, so I suspect a similar change to that recently made to mc.sql mythtv master in commit 83803f53 Database: update mc.sql for MySQL version 8 change is required

Attachments (2)

permission-denied.log.tar.bz2 (7.6 KB) - added by Mike Bibbings 4 years ago.
0001-Config.xml-Change-owner-and-permissions-on-the-final.patch (1.7 KB) - added by rcrdnalor 4 years ago.
Config.xml: Change owner and permissions on the final file, only

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by Bill Meek

Milestone: needs_triage31.0
Owner: set to Bill Meek
Status: newaccepted

comment:2 Changed 4 years ago by Bill Meek

Status: acceptedinfoneeded

Here's the fix for the DB change:

diff --git a/deb/debian/mythtv-database.postinst b/deb/debian/mythtv-database.postinst
index 9b90aa9..8b87d36 100644
--- a/deb/debian/mythtv-database.postinst
+++ b/deb/debian/mythtv-database.postinst
@@ -37,7 +37,8 @@ ask_root_pw() {
 update_database() {
     #Set up privs for mythtv@network
-    if ! echo "GRANT ALL PRIVILEGES ON $database.* TO $mythtv_username@'%' IDENTIFIED BY '$mythtv_password';" | \
+    if ! echo "CREATE USER IF NOT EXISTS $mythtv_username@'%' IDENTIFIED BY '$mythtv_password'; \
+               GRANT ALL ON $database.* TO $mythtv_username@'%';" | \
         mysql $SECURITY_INFO "$database" >/dev/null 2>&1; then

I can't find a way to make the redirection issue fail. Please past the output of this: ls -ld /usr/share/mythtv /usr/share/mythtv/config.xml /etc/mythtv /etc/mythtv/config.xml here (and I'm testing on focal.) I've got no problem with your cp solution, but just would like to understand why redirection fails. Thanks.

comment:3 Changed 4 years ago by Mike Bibbings


output of ld ...

mike@vm-xubuntu2004-2:~$ ls -ld /usr/share/mythtv /usr/share/mythtv/config.xml /etc/mythtv

drwxr-xr-x 2 root root 4096 Feb 5 19:27 /etc/mythtv

drwxr-xr-x 13 root root 4096 Feb 5 19:27 /usr/share/mythtv

-rw-r--r-- 1 root root 514 Feb 4 23:34 /usr/share/mythtv/config.xml

I installed Xubuntu focal daily build in a virtual machine (virtual box host Xubuntu 18.04 LTS), fully updated it and added ppa:mythtvbuntu/31, then the usual sudo apt install mythtv. I have also tried on a bare metal install of Xubuntu focal, same Permission denied message.

Attached is the terminal session log showing the error


Changed 4 years ago by Mike Bibbings

comment:4 Changed 4 years ago by Mike Bibbings


Not sure I would call the cp hack a solution, as I have not really tested it, the initial install is probably fine, but I am not sure about mythtv upgrade.


comment:5 Changed 4 years ago by rcrdnalor

Config.xml: Change owner and permissions on the final file, only

See attached patch.

Newer kernels 'allow restricted O_CREAT of FIFOs and regular files (*)', which prevents editing files in directories with sticky bit set, if the user/group of the file is different to the owner of the directory itself.


See Explanation:

BTW, it also affects mythtv fixes/30 on Ubuntu Focal, see

Changed 4 years ago by rcrdnalor

Config.xml: Change owner and permissions on the final file, only

comment:6 Changed 4 years ago by rcrdnalor

Status: infoneededassigned

comment:7 Changed 4 years ago by Stuart Auchterlonie

Milestone: 31.031.1

Moving open tickets v31.0 -> v31.1

comment:8 Changed 20 months ago by Stuart Auchterlonie

Resolution: Trac EOL
Status: assignedclosed

We have moved all bug tracking to github [1]

If you continue to have this issue, please open a new issue at github, referencing this ticket.

[1] -

Note: See TracTickets for help on using tickets.