【评测机】评测时报错cc1plus: fatal error: /xx/xx/main.cpp: Permission denied compilation terminated.的解决方法

事情是这亚子发生的,原本建立评测机的时候就出现过这个问题,但莫名其妙就解决了。

报错的文件路径是位于docker内的,所以本质上这个错误是docker内的没有权限执行相关文件。

原因是centos7中安全模块selinux把权限禁掉了

解决方案可以临时关闭selinux或者运行docker时使用参数

[root@localhost ]# setenforce 0
[root@localhost ]# setenforce 1

参考:https://cloud.tencent.com/developer/article/1432962

原文地址:https://www.cnblogs.com/axiangcoding/p/11361994.html