I have a crypted container on my NAS, that contains a file .
I access to this file from my main PC (named Michel-PC) by mounting the crypted container from the Veracrypt 1.25.9 interface.
When my work is finished, I dismount the container (located on my NAS) from the Veracrypt interface, then I shut down my PC.
BUT, when I mount the container from another PC and try to access the file, I get the warning message: "this file is locked by another user Michel-PC", and I can only open it as a "read only" file.
What is the problem ??
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you clarify exactly what is happening here, please? You can mount the 'crypted container' from another PC, but there's a file within it that you can only open 'read only'?
On the other PC, do you log in with the same credentials (username and password or PIN)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a NAS on which there is a Veracrypt file named "PERSO_CRYPT4" (approx 500Gb).
After having mount this file on my main PC (let's named PC1), I see all the folders and files that are stored into this "PERSO_CRYPT4" file.
I particularly work with an Excel (see note 1) file, let's named "passwords.xlsx", I have no problem, it works like a charm.
Now, I close the excel file from Excel, I dismount "PERSO_CRYPT4" from the Veracrypt UI, then I shut down my PC.
I go in another room of my home where there is another PC (let's name PC2) connected to my LAN.
I mount "PERSO_CRYPT4" on my PC2 using the Veracrypt UI, so I can see all the folders and files that are stored in the "PERSO_CRYPT4" file.
But when I open "passwords.xlsx" from my PC2, I get a message saying that this file is locked by another user, and it is the user name of PC1.
So I can only open "passwords.xlsx" in read-only mode.
Do you need any additional info ?
Note 1: it is not exactly Excel, it is LibreOffice Calc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On PC2 look into the directory where "passwords.xlsx" is stored. Is there a file ".~lock.passwords.xslx#"? (It would have attribute "hidden".) It shouldn't be there. When LibreOffice is closed on PC1 it should remove this lock file. Maybe, the delete request is not properly handled by VeraCrypt in your setup (container file on NAS).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, you can safely delete the lock file if the spreadsheet is no longer open on any PC.
Such a lock file is not deleted when LibreOffice is abnormally terminated. This means, either the program crashed, or the system was shut down while the program was still active.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some additional thoughts which may or may not be useful for you:
I don't use a NAS.
I trigger (via VeraCrypt settings) auto-dismount (even forced) whenever the Windows session is interrupted (shutdown, restart, hibernation, power saving, user change) for maximum secrecy. This could preserve a lock file but didn't happen here, yet. This reasoning doesn't apply to your case, if you don't use the auto-dismount feature.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Such a lock file is not deleted when LibreOffice is abnormally terminated. This means, either the program crashed, or the system was shut down while the program was still active.
But LibreOffice was normally closed, no crash at all: for example, if I use LO Calc, I save the Calc file, I close Calc (so LO is closed without crash), then I dismount the Vercrypt volume and I shut down windows normally.
BUT, these lock files still exist on the NAS. My LibreOffice version is 7.3.4.2. (64 bits)
The turnarounds that I have found are: manually delete these files, or reboot the NAS.
So there is a problem somewhere ! and I do not see what it is...
Any idea ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If rebooting the NAS really cures the problem, then I think, the lock file's delete operation on the NAS is not immediately executed but put on a queue. A shutdown (reboot) would force execution. Upon dismount VC should close the container file (on the NAS). Maybe this doesn't work properly. I don't know whose fault it could be (VC or NAS).
Your NAS may have diagnostic facilities like a file activity trace. It should show whether a close operation was not sent, or failed.
Anyway, check the configuration of the NAS. There may also be some parameters on the PC side that affect NAS operations. If the NAS supports buffering of operations, then maybe, you can specify a maximum delay (just speculating!).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anyway, check the configuration of the NAS
I did but I don't see any parameters that could impact of the file locking: I am going tp post a question on the Synology forum.
There may also be some parameters on the PC side that affect NAS operations.
Do you know where could be located these parameters ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I noticed once that for some reason (and, as far as I know, for no reason at all) all my LibreOffice word processor documents on a VeraCrypt encrypted drive were suddenly locked and read-only. Rather than have to deal with thousands of locked documents, I found by trial and error that by copying (via Windows Explorer) all the files to a newly encrypted drive, that on the new drive there was no read-only issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Curious...and difficult to identify the cause: is it Libroffice ? is it the Synology NAS ? is it Windows ?
I have recently created a new encrypted volume and copied all my files to this volume, but I did not work in that way previously, so I cannot confirmed your tip...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When rebooting the NAS solves the issue temporally, I'd like to assume that there seems to be an issue with the NAS.
You should have a look at the DSM HDD manager and make sure that buffering is disabled for all involved devices. In case there's no UPS present, that's recommendable in the first place. Additionally, you should make sure that your DSM is up-to-date. Other than that, I also recommend asking the Synology support for ideas about this behavior.
Greets
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a crypted container on my NAS, that contains a file .
I access to this file from my main PC (named Michel-PC) by mounting the crypted container from the Veracrypt 1.25.9 interface.
When my work is finished, I dismount the container (located on my NAS) from the Veracrypt interface, then I shut down my PC.
BUT, when I mount the container from another PC and try to access the file, I get the warning message: "this file is locked by another user Michel-PC", and I can only open it as a "read only" file.
What is the problem ??
Thank you
Can you clarify exactly what is happening here, please? You can mount the 'crypted container' from another PC, but there's a file within it that you can only open 'read only'?
On the other PC, do you log in with the same credentials (username and password or PIN)?
Here it is:
I have a NAS on which there is a Veracrypt file named "PERSO_CRYPT4" (approx 500Gb).
After having mount this file on my main PC (let's named PC1), I see all the folders and files that are stored into this "PERSO_CRYPT4" file.
I particularly work with an Excel (see note 1) file, let's named "passwords.xlsx", I have no problem, it works like a charm.
Now, I close the excel file from Excel, I dismount "PERSO_CRYPT4" from the Veracrypt UI, then I shut down my PC.
I go in another room of my home where there is another PC (let's name PC2) connected to my LAN.
I mount "PERSO_CRYPT4" on my PC2 using the Veracrypt UI, so I can see all the folders and files that are stored in the "PERSO_CRYPT4" file.
But when I open "passwords.xlsx" from my PC2, I get a message saying that this file is locked by another user, and it is the user name of PC1.
So I can only open "passwords.xlsx" in read-only mode.
Do you need any additional info ?
Note 1: it is not exactly Excel, it is LibreOffice Calc.
On PC2 look into the directory where "passwords.xlsx" is stored. Is there a file ".~lock.passwords.xslx#"? (It would have attribute "hidden".) It shouldn't be there. When LibreOffice is closed on PC1 it should remove this lock file. Maybe, the delete request is not properly handled by VeraCrypt in your setup (container file on NAS).
You are right: there is ".~lock.password.xlsx" file !
Can I just delete it , or is there a better way to definitely fix the problem ?
Yes, you can safely delete the lock file if the spreadsheet is no longer open on any PC.
Such a lock file is not deleted when LibreOffice is abnormally terminated. This means, either the program crashed, or the system was shut down while the program was still active.
Some additional thoughts which may or may not be useful for you:
I don't use a NAS.
I trigger (via VeraCrypt settings) auto-dismount (even forced) whenever the Windows session is interrupted (shutdown, restart, hibernation, power saving, user change) for maximum secrecy. This could preserve a lock file but didn't happen here, yet. This reasoning doesn't apply to your case, if you don't use the auto-dismount feature.
But LibreOffice was normally closed, no crash at all: for example, if I use LO Calc, I save the Calc file, I close Calc (so LO is closed without crash), then I dismount the Vercrypt volume and I shut down windows normally.
BUT, these lock files still exist on the NAS. My LibreOffice version is 7.3.4.2. (64 bits)
The turnarounds that I have found are: manually delete these files, or reboot the NAS.
So there is a problem somewhere ! and I do not see what it is...
Any idea ?
UP: no one has a better solution than rebooting the NAS ?
If rebooting the NAS really cures the problem, then I think, the lock file's delete operation on the NAS is not immediately executed but put on a queue. A shutdown (reboot) would force execution. Upon dismount VC should close the container file (on the NAS). Maybe this doesn't work properly. I don't know whose fault it could be (VC or NAS).
Your NAS may have diagnostic facilities like a file activity trace. It should show whether a close operation was not sent, or failed.
Anyway, check the configuration of the NAS. There may also be some parameters on the PC side that affect NAS operations. If the NAS supports buffering of operations, then maybe, you can specify a maximum delay (just speculating!).
There may also be some parameters on the PC side that affect NAS operations.
Do you know where could be located these parameters ?
Sorry, I don't use a NAS. The Synology forum is surely the best place to get advice. Good luck!
For what it is worth...
I noticed once that for some reason (and, as far as I know, for no reason at all) all my LibreOffice word processor documents on a VeraCrypt encrypted drive were suddenly locked and read-only. Rather than have to deal with thousands of locked documents, I found by trial and error that by copying (via Windows Explorer) all the files to a newly encrypted drive, that on the new drive there was no read-only issue.
Curious...and difficult to identify the cause: is it Libroffice ? is it the Synology NAS ? is it Windows ?
I have recently created a new encrypted volume and copied all my files to this volume, but I did not work in that way previously, so I cannot confirmed your tip...
When rebooting the NAS solves the issue temporally, I'd like to assume that there seems to be an issue with the NAS.
You should have a look at the DSM HDD manager and make sure that buffering is disabled for all involved devices. In case there's no UPS present, that's recommendable in the first place. Additionally, you should make sure that your DSM is up-to-date. Other than that, I also recommend asking the Synology support for ideas about this behavior.
Greets