How do I create a directory which can only be accessed and manipulate by the application
-
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 .
-
@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. -
@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 .
-
@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. -
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.