Skip to content

Unable to compile on WSL2 or Docker through ReFS file system #11844

@byeblack

Description

@byeblack

Problem

Unable to compile on WSL2 or Docker when mounting an ReFS partition. Error message "Operation not permitted (os error 1)" is displayed, preventing the creation of the "target" directory. Even when manually creating the directory, the process cannot continue and displays a file write failure error.

Steps

Operation method 1:

  1. Create a project using "cargo new xxx --bin" at any path on an ReFS partition.
  2. Open the corresponding path in the WSL2 Debian subsystem and compile using "cargo build".

Operation method 2:

  1. Open any path on an ReFS partition in the WSL2 Debian subsystem and create a project using "cargo new xxx --bin".

Possible Solution(s)

Operation method 1 to get the result:

error: Operation not permitted (os error 1)

Operation method 2 to get the result:

error: Failed to create package `xxx` at `/mnt/x/xxx`

Caused by:
  failed to rename lockfile to '/mnt/x/xxx/.git/config': Operation not permitted; class=Os (2)

Notes

  1. Performing the same operation on an NTFS partition allows for normal file creation and compilation.
  2. All partitions have the same operating permissions.
  3. "mkdir" and "touch" commands work normally on ReFS partitions.
  4. Compiling works normally within the WSL2 subsystem.
  5. Compiling works normally in a Windows environment.
  6. Obtaining the same result when using Docker containers.

Version

cargo 1.68.0 (115f34552 2023-02-26)
release: 1.68.0
commit-hash: 115f34552518a2f9b96d740192addbac1271e7e6
commit-date: 2023-02-26
host: x86_64-pc-windows-msvc
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:Schannel)
os: Windows 10.0.22622 (Windows 10 Pro for Workstations) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-filesystemArea: issues with filesystemsC-bugCategory: bugO-windowsOS: WindowsS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions