Bug 2144504

Summary: something changes /var/lib/bluetooth access mode
Product: [Fedora] Fedora Reporter: Sandro Bonazzola <sbonazzo>
Component: bluezAssignee: Gopal krishna tiwari <gopalkrishna.tiwari>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: bcotton, bnocera, dwmw2, gopalkrishna.tiwari, pbrobinson, spacewar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2116384    
Bug Blocks:    

Description Sandro Bonazzola 2022-11-21 14:01:26 UTC
Description of problem:

Configuring a fresh Fedora 37 instance and checked the result with:

$ sudo oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_standard --report report.html  /usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml

detected permissions changes on bluez. Manual check also show it:

# rpm -qV bluez
.M.......    /var/lib/bluetooth

# rpm -qlv bluez |grep /var/lib
drwxr-xr-x    2 root     root                        0 set  1 22:27 /var/lib/bluetooth
drwxr-xr-x    2 root     root                        0 set  1 22:27 /var/lib/bluetooth/mesh

# ls -ld /var/lib/bluetooth /var/lib/bluetooth/mesh
drwx------. 1 root root 42  1 set 22.27 /var/lib/bluetooth
drwxr-xr-x. 1 root root  0  1 set 22.27 /var/lib/bluetooth/mesh

Applying the proposed fix `rpm --restore bluez` work for a while, then something changes again the permissions on the directory.
If the required permissions are `drwx------` I think the bluez packaging should be corrected accordingly.
If soomething is changing the permissions there without being supposed to, it should be identified and fixed for not doing it.

Version-Release number of selected component (if applicable):
# rpm -qv bluez
bluez-5.65-3.fc37.x86_64

Comment 1 Sandro Bonazzola 2022-11-25 09:45:21 UTC
Looking at the journal I saw now:
```
systemd[1303]: ConfigurationDirectory 'bluetooth' already exists but the mode is different. (File system: 755 ConfigurationDirectoryMode: 555)
```
so ConfigurationDirectoryMode is different from both the rpm required mode and the filesystem runtime mode.
Not sure if this needs to be tracked on a different bz.

Comment 2 Sandro Bonazzola 2023-05-03 12:54:49 UTC
Still reproducible on Fedora 38: bluez-5.66-5.fc38.x86_64

Comment 3 Peter Robinson 2023-07-01 12:09:33 UTC
*** Bug 2116384 has been marked as a duplicate of this bug. ***