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

Can not create folder - state of the "Create new folder"-Button in QFileDialog

    XMLWordPrintable

Details

    Description

      When using QFileDialog::getOpenFileName() or QFileDialog::getSaveFileName() or even creating the open/save dialog by coding, it is not possible to create a folder if current user is not the owner of current folder.

      $ whoami
      user1
      $
      $ groups
      user1 user-group
      $
      $ ls -lait
      total 28
      drwxrws---   2 user2 user-group   4096 Nov 11 19:24 .
      drwxrws---  94 user2 user-group  24576 Nov 11 19:24 ..
      $
      $ mkdir test
      $ ls -lait
      total 32
      drwxrws---   2 user2 user-group   4096 Nov 11 19:24 .
      drwxrws---  94 user2 user-group  24576 Nov 11 19:24 ..
      drwxrws---   2 user1 user-group   4096 Nov 11 19:30 test
      $
      

      It is possible to create folders from a QFileDialog if others is set to have read and write access in current folder (drwxrwsrw-).

      And if the user1 creates a folder, test1, from a QFileDialog the folder is own by user1:

      $ ls -lait
      total 36
      drwxrwsrw-   5 user2 user-group   4096 Nov 11 19:24 .
      drwxrws---  94 user2 user-group  24576 Nov 11 19:24 ..
      drwxrws---   2 user1 user-group   4096 Nov 11 19:30 test
      drwxrwsrw-   5 user1 user-group   4096 Nov 11 19:37 test1
      $
      

      And user2 will not be able, from a QFileDialog, to delete folder test or test1; or creating a new folder in test or test1.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            di5magjo Magnus Johansson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes