so cal cheesehead
so cal cheesehead

Reputation: 2573

Hudson - java.io.IOException: Failed to mkdirs:

I haven't been able to find a lot of information with regards to Hudson and this issue. I'm trying to build/run my selenium test cases using Hudson. Here's the steps I took

  1. Created a new job
  2. Set custom workspace to /home/selenium/qa/automation
  3. Added build step "Invoke Ant"
  4. Added Target "run" to Targets
  5. Added build.xml to Build File field.
  6. Tried to execute job but it exits with the following error:

Started by user anonymous

java.io.IOException: Failed to mkdirs: /home/selenium/qa/automation
...
...

I figure it's some permissions problem but I just can't figure it out. In /etc/sysconfig/hudson the user to run as is "hudson", should this user be the selenium user instead?

Also, I added the custom workspace because initially Hudson couldn't find the build.xml file. I would get a "Unable to find build script at", I'm not sure if also permissions related.

These are the directory permissions:

drwxrwxr-x 10 selenium selenium 4096 Jan 29 17:18 automation

Can anyone point me in the right direction?

Upvotes: 1

Views: 9259

Answers (2)

so cal cheesehead
so cal cheesehead

Reputation: 2573

Ultimately I ended up changing the HUDSON_USER to my selenium user and giving permissions to /var/lib/hudson and /var/log/hudson to the selenium user.

Upvotes: 0

John Brodie
John Brodie

Reputation: 6027

You have Hudson running as 'hudson', but your workspace is owned by the user 'selenium'. This is an issue as "other" doesn't have write permissions to that directory.

You can chown <directory> hudson:hudson to change the owner, or you can add write permission with chmod 777, as right now it looks to be at 775 (no write permission for "other").

Upvotes: 1

Related Questions