Public bug reported:

Ubuntu 26.04 / AppArmor 5.0.2

transmission-daemon fails to start with:

Another process is already using
'/var/lib/transmission-daemon/.config/transmission-daemon'

There is no other transmission-daemon process and lsof/fuser show no
process holding the lock.

The AppArmor profile shipped by the apparmor package contains:

owner /var/lib/transmission-daemon/.config/transmission-daemon/** rw,

but Transmission takes an OS file lock on:

/var/lib/transmission-daemon/.config/transmission-daemon/lock

AppArmor requires the separate `k` permission for file_lock.

Adding this local override fixes the problem:

owner /var/lib/transmission-daemon/.config/transmission-daemon/lock rwk,
owner /var/lib/transmission-daemon/.config/transmission-daemon/** rw,

and reloading the profile allows transmission-daemon to start normally.

The packaged/upstream profile should grant `rwk` specifically to the
Transmission lock file.

Description:    Ubuntu 26.04.1 LTS
Release:        26.04

apparmor 5.0.2-0ubuntu1~26.04.1

transmission-daemon 4.1.4-0build1~ubuntu26.04 (PPA:
ubuntuhandbook1/transmission, but with Ubuntu's version it should be the
same)

What I expect: transmission-daemon to start normally.
What happened: transmission-daemon didn't start, complained about:
```
transmission-daemon[63662]: [2026-10-27T23:57:13.884+0000] inf 
transmission-daemon Waiting for another process to release 
'/var/lib/transmission-daemon/.config/transmission-daemon' 
(./daemon/daemon.cc:880)
transmission-daemon[63662]: [2026-10-27T23:57:28.893+0000] ERR 
transmission-daemon Another process is already using 
'/var/lib/transmission-daemon/.config/transmission-daemon'. 
(./daemon/daemon.cc:898)
systemd[1]: transmission-daemon.service: Main process exited, code=exited, 
status=1/FAILURE
```
There was no other process as mentioned.

apparmor log:
```
kernel: audit: type=1400 audit(1793145645.943:346): apparmor="DENIED" 
operation="file_lock" class="file" profile="transmission-daemon" 
name="/var/lib/transmission-daemon/.config/transmission-daemon/lock" pid=64525 
comm="transmission-da" requested_mask="k" denied_mask="k" fsuid=114 ouid=114
```

=========

When UPnP/NAT-PMP port mapping is enabled and minissdpd is
installed/running, the confined daemon also needs:

/run/minissdpd.sock rw,

Otherwise AppArmor denies operation="connect" with requested_mask="wr"

=========

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: apparmor 5.0.2-0ubuntu1~26.04.1
ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14
Uname: Linux 7.0.0-38-generic x86_64
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: pass
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Wed Oct 28 00:18:45 2026
InstallationDate: Installed on 2021-07-14 (1931 days ago)
InstallationMedia: Ubuntu-Server 20.04.2 LTS "Focal Fossa" - Release amd64 
(20210201.2)
ProcEnviron:
 LANG=en_GB.UTF-8
 PATH=(custom, user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-7.0.0-38-generic 
root=UUID=20c57f81-6502-4a4c-b27b-9fcf8de50d3e ro intremap=off intel_iommu=off
SourcePackage: apparmor
Syslog: 2026-10-27T05:19:48.059011+00:00 dbus-daemon[1129]: [system] AppArmor 
D-Bus mediation is enabled
UpgradeStatus: Upgraded to resolute on 2026-10-21 (6 days ago)

** Affects: transmission in Transmission BitTorrent Client
     Importance: Undecided
         Status: New

** Affects: apparmor (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: minissdpd (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: transmission (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute

** Also affects: transmission (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: transmission in Transmission BitTorrent Client
   Importance: Undecided
       Status: New

** Description changed:

  Ubuntu 26.04 / AppArmor 5.0.2
  
  transmission-daemon fails to start with:
  
  Another process is already using
  '/var/lib/transmission-daemon/.config/transmission-daemon'
  
  There is no other transmission-daemon process and lsof/fuser show no
  process holding the lock.
  
  The AppArmor profile shipped by the apparmor package contains:
  
  owner /var/lib/transmission-daemon/.config/transmission-daemon/** rw,
  
  but Transmission takes an OS file lock on:
  
  /var/lib/transmission-daemon/.config/transmission-daemon/lock
  
  AppArmor requires the separate `k` permission for file_lock.
  
  Adding this local override fixes the problem:
  
  owner /var/lib/transmission-daemon/.config/transmission-daemon/lock rwk,
  owner /var/lib/transmission-daemon/.config/transmission-daemon/** rw,
  
  and reloading the profile allows transmission-daemon to start normally.
  
  The packaged/upstream profile should grant `rwk` specifically to the
  Transmission lock file.
  
  Description:  Ubuntu 26.04.1 LTS
  Release:      26.04
  
  apparmor 5.0.2-0ubuntu1~26.04.1
  
  transmission-daemon 4.1.4-0build1~ubuntu26.04 (PPA:
  ubuntuhandbook1/transmission, but with Ubuntu's version it should be the
  same)
  
  What I expect: transmission-daemon to start normally.
  What happened: transmission-daemon didn't start, complained about:
  ```
  transmission-daemon[63662]: [2026-10-27T23:57:13.884+0000] inf 
transmission-daemon Waiting for another process to release 
'/var/lib/transmission-daemon/.config/transmission-daemon' 
(./daemon/daemon.cc:880)
  transmission-daemon[63662]: [2026-10-27T23:57:28.893+0000] ERR 
transmission-daemon Another process is already using 
'/var/lib/transmission-daemon/.config/transmission-daemon'. 
(./daemon/daemon.cc:898)
  systemd[1]: transmission-daemon.service: Main process exited, code=exited, 
status=1/FAILURE
  ```
  There was no other process as mentioned.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 26.04
  Package: apparmor 5.0.2-0ubuntu1~26.04.1
  ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14
  Uname: Linux 7.0.0-38-generic x86_64
  ApportVersion: 2.34.1-0ubuntu0.1
  Architecture: amd64
  CasperMD5CheckResult: pass
  CloudArchitecture: x86_64
  CloudID: none
  CloudName: none
  CloudPlatform: none
  CloudSubPlatform: config
  Date: Wed Oct 28 00:18:45 2026
  InstallationDate: Installed on 2021-07-14 (1931 days ago)
  InstallationMedia: Ubuntu-Server 20.04.2 LTS "Focal Fossa" - Release amd64 
(20210201.2)
  ProcEnviron:
-  LANG=en_GB.UTF-8
-  PATH=(custom, user)
-  SHELL=/bin/bash
-  TERM=xterm-256color
-  XDG_RUNTIME_DIR=<set>
+  LANG=en_GB.UTF-8
+  PATH=(custom, user)
+  SHELL=/bin/bash
+  TERM=xterm-256color
+  XDG_RUNTIME_DIR=<set>
  ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-7.0.0-38-generic 
root=UUID=20c57f81-6502-4a4c-b27b-9fcf8de50d3e ro intremap=off intel_iommu=off
  SourcePackage: apparmor
- Syslog: 2026-10-27T05:19:48.059011+00:00 roland-server dbus-daemon[1129]: 
[system] AppArmor D-Bus mediation is enabled
+ Syslog: 2026-10-27T05:19:48.059011+00:00 dbus-daemon[1129]: [system] AppArmor 
D-Bus mediation is enabled
  UpgradeStatus: Upgraded to resolute on 2026-10-21 (6 days ago)

** Description changed:

  Ubuntu 26.04 / AppArmor 5.0.2
  
  transmission-daemon fails to start with:
  
  Another process is already using
  '/var/lib/transmission-daemon/.config/transmission-daemon'
  
  There is no other transmission-daemon process and lsof/fuser show no
  process holding the lock.
  
  The AppArmor profile shipped by the apparmor package contains:
  
  owner /var/lib/transmission-daemon/.config/transmission-daemon/** rw,
  
  but Transmission takes an OS file lock on:
  
  /var/lib/transmission-daemon/.config/transmission-daemon/lock
  
  AppArmor requires the separate `k` permission for file_lock.
  
  Adding this local override fixes the problem:
  
  owner /var/lib/transmission-daemon/.config/transmission-daemon/lock rwk,
  owner /var/lib/transmission-daemon/.config/transmission-daemon/** rw,
  
  and reloading the profile allows transmission-daemon to start normally.
  
  The packaged/upstream profile should grant `rwk` specifically to the
  Transmission lock file.
  
  Description:  Ubuntu 26.04.1 LTS
  Release:      26.04
  
  apparmor 5.0.2-0ubuntu1~26.04.1
  
  transmission-daemon 4.1.4-0build1~ubuntu26.04 (PPA:
  ubuntuhandbook1/transmission, but with Ubuntu's version it should be the
  same)
  
  What I expect: transmission-daemon to start normally.
  What happened: transmission-daemon didn't start, complained about:
  ```
  transmission-daemon[63662]: [2026-10-27T23:57:13.884+0000] inf 
transmission-daemon Waiting for another process to release 
'/var/lib/transmission-daemon/.config/transmission-daemon' 
(./daemon/daemon.cc:880)
  transmission-daemon[63662]: [2026-10-27T23:57:28.893+0000] ERR 
transmission-daemon Another process is already using 
'/var/lib/transmission-daemon/.config/transmission-daemon'. 
(./daemon/daemon.cc:898)
  systemd[1]: transmission-daemon.service: Main process exited, code=exited, 
status=1/FAILURE
  ```
  There was no other process as mentioned.
  
+ apparmor log:
+ ```
+ kernel: audit: type=1400 audit(1793145645.943:346): apparmor="DENIED" 
operation="file_lock" class="file" profile="transmission-daemon" 
name="/var/lib/transmission-daemon/.config/transmission-daemon/lock" pid=64525 
comm="transmission-da" requested_mask="k" denied_mask="k" fsuid=114 ouid=114
+ ```
+ 
+ =========
+ 
+ When UPnP/NAT-PMP port mapping is enabled and minissdpd is
+ installed/running, the confined daemon also needs:
+ 
+ /run/minissdpd.sock rw,
+ 
+ Otherwise AppArmor denies operation="connect" with requested_mask="wr"
+ 
+ =========
+ 
  ProblemType: Bug
  DistroRelease: Ubuntu 26.04
  Package: apparmor 5.0.2-0ubuntu1~26.04.1
  ProcVersionSignature: Ubuntu 7.0.0-38.38-generic 7.0.14
  Uname: Linux 7.0.0-38-generic x86_64
  ApportVersion: 2.34.1-0ubuntu0.1
  Architecture: amd64
  CasperMD5CheckResult: pass
  CloudArchitecture: x86_64
  CloudID: none
  CloudName: none
  CloudPlatform: none
  CloudSubPlatform: config
  Date: Wed Oct 28 00:18:45 2026
  InstallationDate: Installed on 2021-07-14 (1931 days ago)
  InstallationMedia: Ubuntu-Server 20.04.2 LTS "Focal Fossa" - Release amd64 
(20210201.2)
  ProcEnviron:
   LANG=en_GB.UTF-8
   PATH=(custom, user)
   SHELL=/bin/bash
   TERM=xterm-256color
   XDG_RUNTIME_DIR=<set>
  ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-7.0.0-38-generic 
root=UUID=20c57f81-6502-4a4c-b27b-9fcf8de50d3e ro intremap=off intel_iommu=off
  SourcePackage: apparmor
  Syslog: 2026-10-27T05:19:48.059011+00:00 dbus-daemon[1129]: [system] AppArmor 
D-Bus mediation is enabled
  UpgradeStatus: Upgraded to resolute on 2026-10-21 (6 days ago)

** Summary changed:

- transmission-daemon AppArmor profile missing file_lock (k) permission for 
config lock file
+ Transmission-daemon AppArmor profile blocks config file locking and 
/run/minissdpd.sock access

** Also affects: minissdpd (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2172354

Title:
  Transmission-daemon AppArmor profile blocks config file locking and
  /run/minissdpd.sock access

To manage notifications about this bug go to:
https://bugs.launchpad.net/~ubuntuhandbook1/+archive/ubuntu/transmission/+source/transmission/+bug/2172354/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to