简体   繁体   中英

Why the cargo run command throws me OS Error 13 on Linux?

I've created a Rust project with cargo in an external NTFS partition on Arch Linux . When I run cargo build the command works, but if I run the cargo run command, cargo throws me the following error:

[myuser@myuser myproject]$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/myproject`
error: could not execute process `target/debug/myproject` (never executed)

Caused by:
  Permission denied (os error 13)

I believe that the error might have been caused due to the partition's permissions. Here is my mounting configuration in /etc/fstab :

UUID=XXXXXXX                   /path/to/mountpoint ntfs-3g         defaults,nls=utf8,umask=000,dmask=027,fmask=137,uid=1000,gid=1000,windows_names         0 0

A similar error can be found here .

What could be the cause of that problem?

Thank you.

NTFS does not support Linux permissions, and as such it is impossible to execute a file stored on NTFS. Keep your project on a file system designed for Linux, such as ext4, to solve this problem.

NTFS can be configured to allow software execution if you follow the steps as mentioned here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM