How do I create a directory which can only be accessed and manipulate by the application
-
wrote on 2 Dec 2022, 10:39 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 .
-
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 .
wrote on 2 Dec 2022, 10:45 last edited by JonB 12 Feb 2022, 10:50@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. -
@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.wrote on 2 Dec 2022, 10:59 last edited by Deepak Dinesh 12 Feb 2022, 11:02@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 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 .
wrote on 2 Dec 2022, 11:02 last edited by JonB 12 Feb 2022, 11:03@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. -
wrote on 2 Dec 2022, 15:53 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.
-
@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.wrote on 3 Dec 2022, 08:19 last edited by@JonB thanks
6/6