I'm having trouble deploying my Web start to the web server due to permissions problems (reformatted):
/home/hudson/.../build/build-web-start.xml:20: Failed to copy
/home/hudson/.../dist/app.jnlp to
/var/development/.../webstart/app.jnlp due to java.io.FileNotFoundException
/var/development/.../webstart/app.jnlp (Permission denied)
and I couldn't delete the corrupt /var/development/.../webstart/app.jnlp
...so it's obvious what the problem is. I need to do one of the following:
- Find the build user so that I can give it permissions
- Configure hudson to build the app under a specific user (perhaps separating the deploy from the rest of the build)
- Configure the ant build script to execute the deploy under a specific user.
Current situation:
- I'm running Hudson under jetty
- I've given the jetty user group permissions to be able to write to the deploy folder
- HUD开发者_StackOverflow社区SON_HOME is set to /home/hudson
The etc/init.d/jetty
startup script contains the line (by default)
JETTY_USER=jetty
so...
chown jetty /var/development/.../webstart -R
does the trick.
NB: In particular, this highlights that setting jetty's group permissions to be able to write to the directory is not enough: jetty runs it's context under jetty:nogroup; e.g. it has no group.
精彩评论