landscape-config problem with hardened umask 027
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Triaged
|
High
|
Unassigned |
Bug Description
Hi
It is not possible to register a new server with "landscape-config" when using hardened umask. We use umask 027 due to CIS requirements, this creates files under /var/lib/
How to reproduce:
# umask 027
# landscape-config --computer-title test--account-name standalone --url https:/
Fails with:
Traceback (most recent call last):
Failure: twisted.
# ls -l /var/lib/
total 52
drwxr-xr-x 2 landscape landscape 4096 May 16 13:53 annotations.d
-rw-r----- 1 root root 33 May 16 13:54 broker.bpickle
-rw-r----- 1 root root 47 May 16 13:53 broker.bpickle.old
drwxr-xr-x 2 landscape root 4096 May 16 13:53 custom-
-rw-r--r-- 1 root root 12288 May 16 13:53 manager.database
drwxr-xr-x 2 landscape root 4096 May 16 13:53 messages
-rw-r--r-- 1 landscape landscape 23 May 16 13:53 monitor.bpickle
-rw-r--r-- 1 landscape landscape 23 May 16 13:53 monitor.bpickle.old
drwxr-xr-x 5 landscape root 4096 May 16 13:53 package
drwxr-x--- 2 landscape root 4096 May 16 13:53 sockets
-rwxr-xr-x 1 landscape root 100 May 16 13:52 user-update-flag
Rerun with umask 022:
#umask 022
# landscape-config --computer-title test--account-name standalone --url https:/
Registration request sent successfully.
# ls -l /var/lib/
total 60
drwxr-xr-x 2 landscape landscape 4096 May 16 13:53 annotations.d
-rw-r--r-- 1 landscape landscape 364 May 16 13:56 broker.bpickle
-rw-r--r-- 1 landscape landscape 1085 May 16 13:56 broker.bpickle.old
drwxr-xr-x 2 landscape root 4096 May 16 13:53 custom-
-rw-r--r-- 1 root root 12288 May 16 13:53 manager.database
drwxr-xr-x 3 landscape root 4096 May 16 13:56 messages
-rw-r--r-- 1 landscape landscape 12602 May 16 13:56 monitor.bpickle
-rw-r--r-- 1 landscape landscape 23 May 16 13:56 monitor.bpickle.old
drwxr-xr-x 5 landscape root 4096 May 16 13:56 package
drwxr-x--- 2 landscape root 4096 May 16 13:56 sockets
System info:
root@ubuntu2404:~# dpkg -l |grep landsca
ii landscape-client 24.02-0ubuntu5 amd64 Landscape administration system client
ii landscape-common 24.02-0ubuntu5 amd64 Landscape
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
Changed in landscape-client: | |
status: | New → Triaged |
importance: | Undecided → High |