How to fix “The Resource file mode is invalid” on Cloud Foundry

人盡茶涼 提交于 2020-02-24 18:03:06

问题


I'm trying to deploy an app to Bluemix using Cloud Foundry and I'm getting the following output:

the-neutral-zone:KituraTest loganwright$ cf push
Using manifest file /Users/loganwright/Desktop/KituraTest/manifest.yml

Updating app Kitura-Starter in org [redacted] / space dev as [redacted]...
OK

Uploading Kitura-Starter...
Uploading app files from: /Users/loganwright/Desktop/KituraTest
Uploading 3.9M, 1388 files
Done uploading               
FAILED
Error processing app files: Error uploading application.
The resource file mode is invalid: File mode '0444' is invalid. Minimum file mode is '0600'

I've found the following materials, but none of them seem to have a fix, or at least there's a step I'm missing somewhere:

https://github.com/cloudfoundry/cli/issues/685

https://github.com/cloudfoundry/cli/issues/1096

Error pushing changes to cloud foundry

I set all my file's permissions to 0700 using from w/in the directory:

chmod -R 700 *

I'm not great w/ file permission apis so corrections here appreciated as well.


回答1:


After searching around and comparing some other projects, I discovered that there were some artifact files and other things being created that didn't have appropriate permissions.

Adding a .cfignore file fixed this. Here's what mine looks like in case it's helpful:

.build/*
Packages/*
.travis.yml
docker-compose.yml
Dockerfile
*.xcodeproj/


来源:https://stackoverflow.com/questions/45673054/how-to-fix-the-resource-file-mode-is-invalid-on-cloud-foundry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!