Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321857 - Error while executing a job: Permission Denied
Summary: Error while executing a job: Permission Denied
Status: RESOLVED WORKSFORME
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: CI-Jenkins (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CI Admin Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 08:13 EDT by Adolfo Sanchez-Barbudo Herrera CLA
Modified: 2010-08-20 10:54 EDT (History)
4 users (show)

See Also:
david_williams: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adolfo Sanchez-Barbudo Herrera CLA 2010-08-05 08:13:15 EDT
Hi, 

I'm a beginner to the Releng tasks so sorry if this is not a hudson's related issue.

I'm trying to create a nightly build for the MDT/OCL project. In my second attempt I get the following error:

/tmp/hudson6726228086981176628.sh: line 10: /opt/users/hudsonbuild/workspace/buckminster-mdt-ocl-core-nightly/org.eclipse.ocl.releng.buckminster/releng/ocl-build.properties: Permission denied

Link to the build's console:

https://build.eclipse.org/hudson/job/buckminster-mdt-ocl-core-nightly/2/console

Any clue about why this is happenning ?.

Regards,
Adolfo.
Comment 1 Adolfo Sanchez-Barbudo Herrera CLA 2010-08-08 14:13:35 EDT
Nick do you have any idea about why I can't access to our job's workspace ?. Do I have to enquire about any access permission  ?

Thanks in advance,
Adolfo.
Comment 2 Eclipse Webmaster CLA 2010-08-10 10:04:29 EDT
The issue is that the workspace is owned by the hudson user and the co-ordinated release group(of which you are not a member).

I've added David for a review of adding you to the callisto-dev group.

-M.
Comment 3 Adolfo Sanchez-Barbudo Herrera CLA 2010-08-10 14:39:31 EDT
Thanks for looking at this.

Here the bugzilla in which my project lead requests to provide me access to releng-related facilities

https://bugs.eclipse.org/bugs/show_bug.cgi?id=318085

Regards,
Adolfo.
Comment 4 Adolfo Sanchez-Barbudo Herrera CLA 2010-08-16 10:55:14 EDT
Ping ?

I've encountered another problem today while trying to include our M1 build (I'm using our previous hudson job which I can execute: https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-mdt-ocl-3.0-integration) into the Indigo's M1 release. I think the cause of the problme is the same one.

The server reported an error while performing the "cvs commit" command.
org.eclipse.indigo.build: cvs [commit aborted]: could not open lock file `/cvsroot/callisto/org.eclipse.indigo.build/,mdt-ocl.b3aggrcon,': Permission denied

Regards,
Adolfo.
Comment 5 Eclipse Webmaster CLA 2010-08-16 16:06:17 EDT
I've added you to the callisto-dev group.

-M.
Comment 6 Adolfo Sanchez-Barbudo Herrera CLA 2010-08-19 14:03:37 EDT
The problem persists:

https://build.eclipse.org/hudson/job/buckminster-mdt-ocl-core-nightly/8/console

Looking at other jobs configurations, I may give two suggestions :

1. Granting all permissions to the callisto-dev group, or
2. Granting workspace access to the anonymous user.

I'm not sure which is the recommended one.

Regards,
Adolfo.
Comment 7 Eclipse Webmaster CLA 2010-08-19 14:42:14 EDT
I doubt either is required.  I ran the build and managed to capture the shell script it's running (/tmp/hudson#######.sh) and I think the problem is in your settings:

# run the build
. /opt/public/cbi/build/org.eclipse.dash.common.releng/hudson/run.sh 


I'm guessing you mean ./ but with that space it's getting spit out.

-M.
Comment 8 Ed Willink CLA 2010-08-20 05:33:03 EDT
I doubt it too.

From the log it looks as if the problem is that ocl-build.properties
is not executable, which is not surprising since you probably didn't want to execute it.

Looks like a 'trivial' typo. See what someone else's log looks like.
Comment 9 Adolfo Sanchez-Barbudo Herrera CLA 2010-08-20 05:57:15 EDT
Hi webmaster,

I'm confused:

1. How could I check what you are pointing out ?. I can only check this:

https://build.eclipse.org/hudson/job/buckminster-mdt-ocl-core-nightly/10/console

2. The console says that the /tmp/hudson7081251094508658044.sh is used, which
I'm not able to access since it seems it doesn't exist anymore.

3. The error what I see in the console is the following: 

/tmp/hudson7081251094508658044.sh: line 10:
/opt/users/hudsonbuild/.hudson/jobs/buckminster-mdt-ocl-core-nightly/workspace/org.eclipse.mdt/org.eclipse.ocl/releng/org.eclipse.ocl.releng.buckminster/releng/ocl-build.properties:
Permission denied

Which is a file which does exist. It's a permission's issue. I can't figure out
why this is occuring since I don't have any idea about who is really executing
said script. It's supposed to be my user, "asanchez", "hudsonbuild" ?.

4. The command in my job's configuration, which I think (99%) it's proviking the
problem, is the following:

    cat 
"${WORKSPACE}/org.eclipse.mdt/org.eclipse.ocl/releng/org.eclipse.ocl.releng.buckminster/releng/ocl-build.properties"


    echo
    echo "# Define the Build ID (added by Hudson job definition)"
    echo "build.id=${BUILD_TYPE}${COMPACT_BUILD_ID}"
    echo
    echo "# Define the Build Alias (added by Hudson job definition)"
    echo "build.alias=${BUILD_ALIAS}"
    echo
    echo "# Define Hudson Build ID (added by Hudson job definition)"
    echo "hudson.build.id=${BUILD_ID}"
    echo
    echo "site.signing=true"

} > _build_temp/build.properties

So that, I want to READ the "permission denied" file to dump (WRITE) the file + some job's parameter information into a new "build.properties" file of "build" folder I've previously created.

5. That _build_temp/build.properties has the following permissions (it seems that the file is created):

-rw-r--r-- 1 hudsonbuild callisto-dev 0 2010-08-19 14:32 build.properties

which seems to be only writable by hudsonbuild.

Should callisto-dev group have write access, hence the cause of the problem ?

Does this diagnosis better help ?

Cheers,
Adolfo.
Comment 10 Eclipse Webmaster CLA 2010-08-20 10:46:44 EDT
> 1. How could I check what you are pointing out ?. I can only check this:
> 
> https://build.eclipse.org/hudson/job/buckminster-mdt-ocl-core-nightly/10/console

Well I did it by  adding a sleep to your build script and then forcing a build and having a script on build running doing this(as the hudson user):

for i in (1..250) do; cp -rp /tmp/hudson*.sh .; done

However my previous comment about the . / is incorrect(my mistake).  The issue was your script had:

cat
"{$workspace}".....

Which is basically calling cat and then just printing the path of the build.properties file, which hudson tries to execute.

I've tweaked your build script to remove the \r\n and it seems much happier.  It's still failing, but somewhere else.

-M.
Comment 11 Adolfo Sanchez-Barbudo Herrera CLA 2010-08-20 10:54:51 EDT
Oh !!

Thank you very much ;).

I'll go on with the job's warm up the next week.

Cheers,
Adolfo.