summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstandardpaths_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qstandardpaths_unix.cpp')
-rw-r--r--src/corelib/io/qstandardpaths_unix.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp
index 469c223b00..2d08c1c4e6 100644
--- a/src/corelib/io/qstandardpaths_unix.cpp
+++ b/src/corelib/io/qstandardpaths_unix.cpp
@@ -131,8 +131,10 @@ QString QStandardPaths::writableLocation(StandardLocation type)
return QString();
}
// "and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700."
+ // since the current user is the owner, set both xxxUser and xxxOwner
QFile file(xdgRuntimeDir);
- const QFile::Permissions wantedPerms = QFile::ReadUser | QFile::WriteUser | QFile::ExeUser;
+ const QFile::Permissions wantedPerms = QFile::ReadUser | QFile::WriteUser | QFile::ExeUser
+ | QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner;
if (file.permissions() != wantedPerms && !file.setPermissions(wantedPerms)) {
qWarning("QStandardPaths: wrong permissions on runtime directory %s", qPrintable(xdgRuntimeDir));
return QString();