Re: Diego: Permission denied when starting application with startup command

Daniel Mikusa

On Wed, Feb 17, 2016 at 4:30 AM, Meng, Xiangyi <xiangyi.meng(a)> wrote:

Hi, Daniel

CF:230 Diego: 0.1441.0 Garden-linux: 0.327.0

I ran “chmod a+x *” under my application’s “bin” folder and then zip all
files. The command for starting application is “bin/ -m dev”.

I downloaded the droplet from CC after staging on diego, the file
permission under “bin” folder was modified to “-rw-r--r--”.

How would diego decide which file’s permission should be preserved and
which one should be modified.
My understanding is that it doesn't. Diego just lets thing pass through
unchanged, whereas the DEA would previously force a specific set of

In this case, it might be the cf cli that is the problem. You're creating
the JAR/WAR with the proper permissions on your script (I'm assuming you've
unzipped to verify the permission is retained, if not do that and
confirm). The next step is for the cf cli to extract your files and upload
them. The cf cli doesn't upload your JAR / WAR file whole. It unzips it
and uploads files individually. This is how it can skip certain parts of
your application that have been already uploaded. This would be the next
phase where there could possibly be an issue.

I found a very strange thing. Part of jar files under “bundles” folder
were modified to “-rwxr--r--”. But part of them were not changed.
Interesting. What OS are you running locally? Linux, Mac, Windows,
Cygwin? Also, what is your version of cf? `cf -v`?


*From:* Daniel Mikusa [mailto:dmikusa(a)]
*Sent:* 2016年2月16日 23:26
*To:* Discussions about Cloud Foundry projects and the system overall.
*Subject:* [cf-dev] Re: Diego: Permission denied when starting
application with startup command

On Tue, Feb 16, 2016 at 4:21 AM, Meng, Xiangyi <xiangyi.meng(a)>


Our application is started by a shell script. So we pushed our application
with –c option. It works fine with dea. Application could be started
successfully. But when I pushed the application into diego, I got “bash
bin/ permission denied”. I also found if I pushed and started the
application into dea first and enabled diego later, the error was gone. I
guess that is because dea will update file permission during staging.

I suspect you're running into this:

I also tried to grant permission when zipping the applciation. But diego
totally ignore the setting. Could someone help me to solve this problem?

What version of cf are you using? What is your OS? What do you mean by
"grant permission when zipping the application", what commands are you
running to do that?


Join to automatically receive all group messages.