WSL icon indicating copy to clipboard operation
WSL copied to clipboard

\\wsl$ filesystem does not support file locking

Open patriklantto opened this issue 6 years ago • 30 comments

Trying to use SVN from Windows on the \wsl$ drive (in WSL2 mode), svn reports the following:

svn: E200033: Another process is blocking the working copy database, or the underlying filesystem does not support file locking; if the working copy is on a network filesystem, make sure file locking has been enabled on the file server svn: E200033: sqlite[S5]: database is locked, executing statement 'PRAGMA case_sensitive_like=1;PRAGMA synchronous=OFF;PRAGMA recursive_triggers=ON;PRAGMA foreign_keys=OFF;PRAGMA locking_mode = NORMAL;PRAGMA journal_mode = TRUNCATE;'

I assume the problem is that the "underlying filesystem does not support file locking" - is this assumption correct, and is there a way to address this?

patriklantto avatar Nov 18 '19 12:11 patriklantto

Information according to the ISSUE_TEMPLATE:

  • Microsoft Windows [Version 10.0.19013.1122]
  • Mount \wsl$\Ubuntu as U:
  • Try to checkout a SVN repository into a directory under U: using "svn co "
  • svn will fail with the following message:

svn: E200033: Another process is blocking the working copy database, or the underlying filesystem does not support file locking; if the working copy is on a network filesystem, make sure file locking has been enabled on the file server

  • svn version is 1.13.0 (r1867053)

patriklantto avatar Nov 19 '19 10:11 patriklantto

Did you find a solution? I am facing the same problem.

MartijnJonkers avatar Mar 20 '20 20:03 MartijnJonkers

Did you find a solution? I am facing the same problem.

Unfortunately not :-(

The reason I would like to use SVN from the Windows environment and not WSL is that we have some Windows tools for SVN operations - and for now I am using rsync to move files between the two filesystems when I need to use these tools.

patriklantto avatar Mar 27 '20 07:03 patriklantto

Hi guys,

Did you find any solution meanwhile? This is really a mess not being able to use SVN.

luisfdgon avatar Jun 22 '20 09:06 luisfdgon

Hi, you can install a SVN client on you WSL(sudo apt install subversion), and use this SVN to checkout...

GbuHti avatar Oct 26 '20 07:10 GbuHti

Yes you can use a SVN client in WSL2, but it is a pitty not to be able to use TortoiseSVN which is much more powerfull imho. Issue seems related to https://github.com/sqlitebrowser/sqlitebrowser/issues/2142 and kind of the opposite of wsl1 issue: https://github.com/microsoft/WSL/issues/2395

oxidaan avatar Oct 26 '20 08:10 oxidaan

Alternatively u can install additional file synchronization software. Im using https://syncthing.net/ its easy to set up and use on WSL and Windows and thanks to this setup I can use with no problem any available SVN software on my windows machine.

makerlabs avatar Jul 30 '22 22:07 makerlabs

when this going to fixed. any idea?

hsali avatar Jan 08 '23 18:01 hsali

I tried using pycharm and sqlite db. jetbrain depended to fix their side.

https://youtrack.jetbrains.com/issue/DBE-11014/Datagrip-Support-for-WSL-paths-SQLite#focus=Comments-27-6073328.0-0

hsali avatar Jan 08 '23 18:01 hsali

We need this

rinormaloku avatar Feb 15 '23 08:02 rinormaloku

We need this

vbirds avatar Apr 13 '23 09:04 vbirds

Same problem here with SQLite

olimexsmart avatar Apr 30 '23 16:04 olimexsmart

The work-around I use is to add a Samba share from the root of the WSL2 filesystem. I use following commands in Ubuntu `# Install samba server export DEBIAN_FRONTEND=noninteractive &&
sudo apt update &&
sudo apt install --no-install-recommends --yes samba && \

Configure the samba server

sudo bash -c "cat >> /etc/samba/smb.conf" << EOT [wslroot] comment = Root of the wsl machine path = / read only = no browsable = yes EOT

Set the password for the samba-user

echo "mypass mypass" | sudo smbpasswd -a -s ${USER} && \

(Re)-start the samba server with the updated configuration

sudo service smbd restart && \

echo "Samba share for wslroot installed successfully!" ` Then you can map this share to a network drive. On the drive, you can use SVN or TortoiseSVN as you want. Just note that line endings might be different depending upon your setup.

The fact that the samba share allows to work-around means that the real root cause of this issue is in the protocol that Microsoft uses for the WSL2 file sharing. Not sure if this is caused by the choice for Plan 9 (https://nelsonslog.wordpress.com/2019/06/01/wsl-access-to-linux-files-via-plan-9/).

johan-laneau avatar May 02 '23 06:05 johan-laneau

This is still an issue for developers testing dockerized linux apps on Windows that use SqlLite databases, because this requires a docker volume on WSL, which exhibits this issue, making it impossible to work with SQLLite.

jhimes144 avatar Dec 28 '23 00:12 jhimes144

up

dionisvl avatar Jan 17 '24 14:01 dionisvl

up

davidedelerma avatar Jan 17 '24 15:01 davidedelerma

Also having this issue: https://github.com/pocketbase/pocketbase/discussions/4367#discussioncomment-8516929

PylotLight avatar Feb 19 '24 13:02 PylotLight

Still an issue in PHP Storm

g10-fred avatar Feb 20 '24 08:02 g10-fred

Still encountering on PyCharm

tddouglas avatar Mar 21 '24 02:03 tddouglas

Still valid

fliespl avatar Apr 12 '24 09:04 fliespl

Ran into this just today with SQLite browsers. 😞

strawberrymelonpanda avatar May 13 '24 23:05 strawberrymelonpanda

up

dionisvl avatar Jul 17 '24 06:07 dionisvl

Up

rustam-python avatar Aug 13 '24 13:08 rustam-python

Need this

ndn1991 avatar Aug 31 '24 16:08 ndn1991

up

traktorlixach avatar Sep 11 '24 21:09 traktorlixach

up

musabadru avatar Nov 11 '24 10:11 musabadru

Adding one more plea in 2025. Hopefully the year for a fix 🤞

Melochaotic avatar Feb 12 '25 12:02 Melochaotic

need this

zkw13 avatar Feb 17 '25 01:02 zkw13

UP!!

Luca1978 avatar Mar 20 '25 13:03 Luca1978

It may be helpful to someone. I have fixed the issue with PHPStorm connection by adding 'file' before the path and
'?nolock' param after. Also, there are backslashes in the path.

Example:

jdbc:sqlite:file:\\wsl$\Ubuntu\path\to\database\file\database.sqlite?nolock=1

mariagdcGroup avatar May 27 '25 09:05 mariagdcGroup