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

Regression: QSettings create new file with too restrictive permissions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.5.0 Beta
    • 5.4.0
    • Core: I/O
    • None
    • Linux
    • a60571b3700e80f44705ebc4bab9628cf852891c

      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);
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes