Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.1
-
None
-
Ubuntu Touch - 14.10, armhf build
-
fc2fcacfcc5e644a3463f34e007e89c5f8bfdf22 d0ed6dc1464bd4b62b765060901de708eec5687d
Description
When QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) is called on Ubuntu Touch, the function returns an empty string and the following log can be seen:
"QStandardPaths: wrong permissions on runtime directory /run/user/32011"
The implementation seems to check for User RWX permission and if those are not teh exact permissions, it will try to set them (snippet from QStandardPaths:
// "and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700." QFile file(xdgRuntimeDir); const QFile::Permissions wantedPerms = QFile::ReadUser | QFile::WriteUser | QFile::ExeUser; if (file.permissions() != wantedPerms && !file.setPermissions(wantedPerms)) { qWarning("QStandardPaths: wrong permissions on runtime directory %s", qPrintable(xdgRuntimeDir)); return QString(); }
However file.permissions() return 0x77000 on Ubuntu (also on desktop), which causes the file.setPermissions() to be called.
Attachments
For Gerrit Dashboard: QTBUG-41735 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
96288,2 | Don't always chmod the XDG_RUNTIME_DIR | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |
96289,3 | Report the system error on why chmod(2) failed in XDG_RUNTIME_DIR | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |