I am not sure what Sub of StackExchange is correct to post this. This is my original post in Tex.SE.

I want to create a secured Latex folder (as my working directory) in my Lab PC. Only I and my supervisor can open this by using the password that I generated. It must be a secured folder because this server is open for anyone in the lab. Obviously, Latex program must be able to access it securely as well to compile the .tex files.

Due to the lab regulation, I cannot use cloud services.

Do you have any suggestion how I should do this? I am open to other workflow that do the job as well.

I hope I explained what I want clearly here. Let me know if you need more information.

2 Answers 2


I suggest VeraCrypt, the successor of TrueCrypt.

It does not create a secured folder, but it creates an encyrpted file that is later mounted as a hard disk, like a virtual hard disk. When mounted, the files are visible and act like normal files, so they will work with TeX as well. Do not forget to unmount after use.


  • it's really secure. If you forget the password, even an administrator cannot bring it back.
  • people can't even see what files are contained on the disk.


  • you somehow need to make sure that nobody deletes the VeraCrypt file, otherwise all your files contained therein are lost.
  • if the server is a multi-user system, other people might see the files as long as you have mounted the encrypted disk.
  • thank you for your answer. I come across this post before superuser.com/questions/103565/password-protect-a-folder. The 2nd point on the disadv kinda cancel the intention of having the functionality I want to have. I really appreciated that you mention this disadv though. I upvoted your answer. If you have other suggestion, I would like to hear it. Dec 20, 2020 at 21:17
  • @Codelearner777: does everyone log in with the same account? Or do the students have their own username and password? Dec 21, 2020 at 8:02
  • Everyone has to login with their account to use the PC, i.e., we have our own username and password. Once login, we can see some shared network drives. Some of these network drives are open, everyone can read/write. I have one folder with my name in this open drive. However, the user cannot access the local drive of the PC that is (being) used by other user. Dec 21, 2020 at 9:41
  • After some thinking, now I am thinking that your suggestion might work, if the mounted virtual drive pops up as a local drive in the PC being used, even though, the veracrypt files and my Latex files is located in that folder with my name. Dec 21, 2020 at 9:41
  • I tried and did the setup for VeraCrypt portable. It worked nicely on my PC. Unfortunately it require admin rights, which I do not have, to run the program in the Lab PC, even though it is a portable version. If you have other suggestion, I would really like to hear. Dec 21, 2020 at 12:21

Everyone has to login with their account to use the PC, i.e., we have our own username and password.

In that case it might even be sufficient to set the folder permissions correctly. As long as the file system supports permissions (which is the case for NTFS, the default file system of Windows), you can edit the security settings in the folder properties.

To set this up properly, you may want to ask your administrator for help, if you do this the first time. Otherwise it's possible that you lock yourself out. Try it on an empty folder first and only move your TeX files inside that folder once you're sure it works as expected,

Add yourself and your supervisor namely (one person each).

By default, the list contains "Users" and "Authenticated users", which you need to remove, because it applies to any authenticated user (a group of people). You may need to disable inheritance of security attributes to be able to remove these groups.

Do NOT deny access to "Users" and "Authenticated Users", because denials have priority over permissions and thus would block you and your supervisor as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.