简体   繁体   English

通过jenkins访问Linux文件权限被拒绝

[英]Linux file access via jenkins Permission Denied

I am running selenium test via jenkins. 我正在通过詹金斯进行硒测试。 All packages are uploaded to linux server. 所有软件包都上传到linux服务器。 In my test there is need of reading and writing to excel. 在我的测试中,需要读写才能出类拔萃。

Every time when I upload new xls file, I have to run following command : 每当我上传新的xls文件时,我都必须运行以下命令:

chmod 777 path/test.xls chmod 777路径/test.xls

If I replace new excel on linux and run build via jenkins without run above command, Jenkins says permission denied. 如果我在linux上替换了新的excel并通过jenkins运行了build而没有在命令上方运行,Jenkins表示许可被拒绝。

Is there any command which set permanent permission to access file from linux? 是否有设置永久访问Linux文件权限的命令?

you can change the permission for directory as recursive using the -R option, so when the file is placed in the folder it will have the same permission as the directory. 您可以使用-R选项将目录的权限更改为递归,因此,将文件放置在文件夹中时,它将具有与目录相同的权限。

try this : 尝试这个 :

chmod -R 777 path/

Note: This will change all the files and subfolders in the directory to 777 注意:这会将目录中的所有文件和子文件夹更改为777

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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