Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-44086

Regression: QSettings create new file with too restrictive permissions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.4.0
    • Fix Version/s: 5.5.0 Beta
    • Component/s: Core: I/O
    • Labels:
      None
    • Environment:
      Linux
    • Commits:
      a60571b3700e80f44705ebc4bab9628cf852891c

      Description

      Since Qt 5.4.0, creating a new .ini file with the help of QSettings causes the file to have very limited rights (file permissions 600 on Unix). This is a regression from Qt 5.3 and earlier, where the same file was created with normal rights (644 typically).

      Test case

         QSettings s("settings.ini", QSettings::IniFormat);
          s.setValue("some", "value");
          s.sync();
          QFileInfo file(s.fileName());
          qDebug() << "Can everyone read file?" <<  file.permissions().testFlag(QFile::ReadOther);
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                kkohne Kai Köhne
                Reporter:
                kkohne Kai Köhne
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes