Search code examples
ibm-cloudcloud-foundry

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


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.


Solution

  • 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/