Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved How do I create a directory which can only be accessed and manipulate by the application

    General and Desktop
    directory security c++11 windows10
    3
    6
    125
    Loading More Posts
    • 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.
    • D
      Deepak Dinesh last edited by

      I am doing some R&D on a feature to be implemented and I want to create a directory which can only be opened and manipulated by the application; the user even with admin rights should not be able to change the permission . Ie is there any api or method available to create a protected directory that can only be opend by the application with a prompted password ; like folder lock . I am using c++11 with latest qt creator for windows .

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @Deepak Dinesh last edited by JonB

        @Deepak-Dinesh
        No. (Not so far as I know anyway, even for Windows.)

        the user even with admin rights should not be able to change the permission .

        A user with admin rights can change anything. Else we would be in a bad situation....

        EDIT
        Hmm, for Windows, maybe I'm wrong! Article https://www.laptopmag.com/articles/password-protect-folder-windows-10 , https://toolbox.easeus.com/file-lock-tips/lock-a-folder.html ? Whether that can be adjusted so that an application can lock/unlock/access to take password from user and apply from program I don't know. I would still accept an admin/user with admin rights to be to control this/switch it on or off.

        D 1 Reply Last reply Reply Quote 0
        • D
          Deepak Dinesh @JonB last edited by Deepak Dinesh

          @JonB Ow ok , thanks for your quick reply ; is there any API available to use features of a folder lock applications ?? Atleast any methods to password protect a directory created by the application ? I want to do the dir creation and lock through the QT application itself .

          JonB 1 Reply Last reply Reply Quote 0
          • JonB
            JonB @Deepak Dinesh last edited by JonB

            @Deepak-Dinesh
            I would not know! What I can say is it would be outside the scope of any Qt code (which is mostly platform-independent) as it would be Windows-only. Unless somebody else answers here, you would need to follow the links above and Google a bit to see how it's implemented under Windows and likely make direct calls to any library from your Qt code.

            D 1 Reply Last reply Reply Quote 0
            • W
              wrosecrans last edited by

              Create a dedicated user account to run the application. Only let that user have permissions to run the application, and only let that user have permissions to the folder.

              1 Reply Last reply Reply Quote 0
              • D
                Deepak Dinesh @JonB last edited by

                @JonB thanks

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post