Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFileDialog to select a file returns Permission denied

QFileDialog to select a file returns Permission denied

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 951 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • cerrC Offline
    cerrC Offline
    cerr
    wrote on last edited by
    #1

    Hi,

    I need a file dialog to open get the path to a binary.
    I've tried:

        PathSet(QFileDialog::getOpenFileName(parent,
            nme_get()+" binary", "/usr/bin", "All Files (*.*)"));
    

    which seems to work only that it prints QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied to stdout when it opens up plus the dialog is unresponsive for a few ~3(?) and the files in /usr/bin/ seem to have finished loadinng - before I actually can interact with the dialog and choose a file. How do I

    1. get rid of the permission error
    2. make the dialog more responsive? There's nothing else n the function that could/would block it nor is there anything else in my application going on in the background. It's just waiting for this file...:
    void ScaperDialog::ChooseBin(void) {
        PathSet(QFileDialog::getOpenFileName(parent,
            nme_get()+" binary", "/usr/bin", "All Files (*.*)"));
    }
    
    jsulmJ JonBJ 2 Replies Last reply
    0
    • cerrC cerr

      Hi,

      I need a file dialog to open get the path to a binary.
      I've tried:

          PathSet(QFileDialog::getOpenFileName(parent,
              nme_get()+" binary", "/usr/bin", "All Files (*.*)"));
      

      which seems to work only that it prints QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied to stdout when it opens up plus the dialog is unresponsive for a few ~3(?) and the files in /usr/bin/ seem to have finished loadinng - before I actually can interact with the dialog and choose a file. How do I

      1. get rid of the permission error
      2. make the dialog more responsive? There's nothing else n the function that could/would block it nor is there anything else in my application going on in the background. It's just waiting for this file...:
      void ScaperDialog::ChooseBin(void) {
          PathSet(QFileDialog::getOpenFileName(parent,
              nme_get()+" binary", "/usr/bin", "All Files (*.*)"));
      }
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @cerr On which platform does this happen?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      cerrC 1 Reply Last reply
      1
      • cerrC cerr

        Hi,

        I need a file dialog to open get the path to a binary.
        I've tried:

            PathSet(QFileDialog::getOpenFileName(parent,
                nme_get()+" binary", "/usr/bin", "All Files (*.*)"));
        

        which seems to work only that it prints QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied to stdout when it opens up plus the dialog is unresponsive for a few ~3(?) and the files in /usr/bin/ seem to have finished loadinng - before I actually can interact with the dialog and choose a file. How do I

        1. get rid of the permission error
        2. make the dialog more responsive? There's nothing else n the function that could/would block it nor is there anything else in my application going on in the background. It's just waiting for this file...:
        void ScaperDialog::ChooseBin(void) {
            PathSet(QFileDialog::getOpenFileName(parent,
                nme_get()+" binary", "/usr/bin", "All Files (*.*)"));
        }
        
        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @cerr
        And further to @jsulm, under whatever user you run your Qt app as, what does ls /usr/bin, or even ls -lR /usr/bin give --- any Permission denied?

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @cerr On which platform does this happen?

          cerrC Offline
          cerrC Offline
          cerr
          wrote on last edited by
          #4

          @jsulm said in QFileDialog to select a file returns Permission denied:

          @cerr On which platform does this happen?

          Linux , kernel 4.4.0-159,

          And further to @jsulm, under whatever user you run your Qt app as, what does ls /usr/bin, or even ls -lR /usr/bin give --- any Permission denied?

          my "regular" user account, and no, ld /usr/bin & /ls -lR /usr/bin both list the contents just fine

          $ groups
          ron sudo dip netdev vboxusers wireshark docker
          
          JonBJ 1 Reply Last reply
          0
          • cerrC cerr

            @jsulm said in QFileDialog to select a file returns Permission denied:

            @cerr On which platform does this happen?

            Linux , kernel 4.4.0-159,

            And further to @jsulm, under whatever user you run your Qt app as, what does ls /usr/bin, or even ls -lR /usr/bin give --- any Permission denied?

            my "regular" user account, and no, ld /usr/bin & /ls -lR /usr/bin both list the contents just fine

            $ groups
            ron sudo dip netdev vboxusers wireshark docker
            
            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @cerr
            The root of whatever the problem is lies in the
            QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied

            see whether either of

            • https://toggen.com.au/blog/it-tips/cause-of-qcad-qinotifyfilesystemwatcherengineaddpaths-inotify_add_watch-failed-permission-denied
            • https://forum.libreelec.tv/thread/1805-fail-on-read-only-fs-without-useful-notice/

            help you/give you any hints. Otherwise I think you'll have to read up on however "Linux inotify user permissions" work....

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved