PermissionError: [Errno 13] Permission denied: '../Electricity/LD2011_2014.txt'
时间: 2023-08-20 11:09:54 浏览: 109
根据引用\[1\]中的报错信息,PermissionError: \[Errno 13\] Permission denied: 'D:\\Sw_Prj\\application\\SW_Module\\dist\\DemoSoftware\\ucrtbase.dll',这个错误是由于权限被拒绝导致的。根据引用\[2\]中的解决办法,可以尝试以下两种方法来解决这个问题:
1. 使用root权限进入容器并执行文件。可以通过以下命令进入容器:
```
docker exec -u 0 -it 容器名称 /bin/bash
```
然后再执行文件。这样以root用户的身份进入容器后,可能会解决权限问题。
2. 确认容器的Privileged状态。可以使用以下命令来检查容器的Privileged状态:
```
docker inspect --format='{{.HostConfig.Privileged}}' 容器ID
```
如果返回的结果是'false',说明创建容器时没有加--privileged参数。可以通过在docker-compose.yaml文件中添加privileged: true参数或者使用sudo docker run --privileged \[image_name\]命令来修正这个问题。
综上所述,你可以尝试使用以上两种方法来解决PermissionError: \[Errno 13\] Permission denied错误。
#### 引用[.reference_title]
- *1* [pyinstaller打包提示PermissionError: [Errno 13] Permission denied....\\ucrtbase.dll 的解决办法:@...](https://blog.csdn.net/yellow_hill/article/details/125716669)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [docker中运行python文件,报错PermissionError: [Errno 13] Permission denied: ‘./data/xx.pkl](https://blog.csdn.net/cy15625010944/article/details/125979676)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)