[英]Cannot run program “/home/pi/SPI-Py/MFRC522-python/Read.py”: error=13, Permission denied
I'm trying to run a code that runs another code, and i get the following error Cannot run program "/home/pi/SPI-Py/MFRC522-python/Read.py": error=13, Permission denied 我正在尝试运行运行另一个代码的代码,但出现以下错误无法运行程序“ /home/pi/SPI-Py/MFRC522-python/Read.py”:error = 13,权限被拒绝
My Code Is: 我的代码是:
import java.io.*;
public class Test {
public static void main(String []args) throws IOException {
Runtime.getRuntime().exec("/home/pi/SPI-Py/MFRC522-python/Read.py");
}
}
When you get a permission denied
error it's because whoever is running it doesn't have permissions to run it. 当您收到
permission denied
错误时,这是因为无论运行它的人都没有运行它的权限。 You need to run said program as root so sudo python Read.py
instead of python Read.py
. 您需要以root用户身份运行上述程序,所以是
sudo python Read.py
而不是python Read.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.