-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Windows Version
Microsoft Windows [Version 10.0.19045.3693]
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
5.15.133.1-1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
I created a container from the default WSL image of Ubuntu 22.04, and logged in.
Check the file permissions for $XDG_RUNTIME_DIR:
$ stat -c '%A %a %n' $XDG_RUNTIME_DIR
drwxr-xr-x 755 /run/user/1000/
Use Qt's QStandardPaths
Run a piece of software or a script that depends on Qt's QStandardPath, e.g. this minimal Python script:
#!/usr/bin/env python3
from PyQt6.QtCore import QStandardPaths
QStandardPaths.standardLocations(QStandardPaths.StandardLocation.RuntimeLocation)
Expected Behavior
Expected file permissions:
According to the XDG Base Directory Specification it should always have permissions 700, ie:
$XDG_RUNTIME_DIR defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700.
Expected output:
$ stat -c '%A %a %n' $XDG_RUNTIME_DIR
drwxr-xr-x 700 /run/user/1000/
Expected Qt behavior
No warnings or errors.
Actual Behavior
Actual file permissions:
$ stat -c '%A %a %n' $XDG_RUNTIME_DIR
drwxr-xr-x 755 /run/user/1000/
Actual Qt behavior
QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700
Diagnostic Logs
No response