Re: console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2016-04-26 Thread koppula chiranjeevi
I am getting the following error message with Jenkins 2.0 build . can you 
help me :

java.io.IOException: Failed to mkdirs: 
/var/jenkins/workspace/clinfo/label/ROCm-Fiji1
at hudson.FilePath.mkdirs(FilePath.java:1163)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1267)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE


On Friday, March 8, 2013 at 3:21:04 PM UTC+5:30, KimSia Sim wrote:
>
> I have this command
>
> mkdir /var/virtual/folder
>
> I can execute this when I ssh into my server as `jenkins`
>
> /var/virtual belongs to www-data, but not an issue because I made 
> /var/virtual 775 and `jenkins` is a member of `www-data` group
>
>
> However, when I run the exact same command in my web interface Jenkins 
> system as a build task, I get a permission denied.
>
> I am running  Jenkins ver. 1.504  Please advise.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f72a6b64-7fdf-449a-ac3e-741dc258dc29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2013-03-09 Thread Jonathan Rogers
KimSia Sim wrote:
> Thank you for your advice Jonathan!
>
> I have solved the problem by restarting the Jenkins service.
>
> I had to run the following command in my console.
>
> sudo service jenkins restart
>
> This restart works better than the web gui restart sequence.
>
> For reasons unknown to me.

Group membership is only set at the beginning of a session or by using
an explicit command like newgrp. If you edited /etc/group while Jenkins
was running, then told Jenkins to restart itself, it would not have
picked up the changes. An initscript invoked by the service command does
start the service in a new session.

>
> On Saturday, March 9, 2013 2:35:17 PM UTC+8, JonathanRRogers wrote:
>
> KimSia Sim wrote:
> > Under build step execute shell command, I only have the following
> > echo "running whoami" & whoami
> > echo "running groups" & groups
> > echo $PWD
> > mkdir /var/virtual/stage.xxx.com/test1 
> >
> > These are my results.
> > + whoami
> > jenkins
> > + echo running whoami
> > running whoami
> > + groups
> > nogroup
> > + echo running groups
> > running groups
> > + echo /var/lib/jenkins/workspace/LTE develop
> > /var/lib/jenkins/workspace/LTE develop
> > + mkdir /var/virtual/stage.xxx.com/test1
> 
> > mkdir: cannot create directory `/var/virtual/stage.xxx.com/test1
> ': Permission denied
> > Build step 'Execute shell' marked build as failure
> > Finished: FAILURE
> > What should I do next?
>
> As you can see from your above output, the Jenkins process is
> running as
> a member of the "nogroup" group, not "www-data". This probably means
> that user "jenkins" is not listed as member of "www-data" in
> /etc/group.
> Alternatively, the script which starts Jenkins or Jenkins itself
> could
> be explicitly changing the group membership. You need to determine
> why
> Jenkins is not running with the group membership you expect. Keep in
> mind that group membership is determined at process start time so you
> have to restart Jenkins after changing /etc/group to see any effects.
>
> BTW, in a shell script the "&" character means to run the preceeding
> command in the background, which probably not what you intended as
> the
> reason that the output order is odd. Use ';' to separate two commands
> but execute them sequentially.
>
> >
> > On Saturday, March 9, 2013 12:46:39 AM UTC+8, JonathanRRogers
> wrote:
> >
> >
> >
> > On Friday, March 8, 2013 4:51:04 AM UTC-5, KimSia Sim wrote:
> >
> > I have this command
> >
> > mkdir /var/virtual/folder
> >
> > I can execute this when I ssh into my server as `jenkins`
> >
> > /var/virtual belongs to www-data, but not an issue
> because I
> > made /var/virtual 775 and `jenkins` is a member of
> `www-data`
> > group
> >
> >
> > However, when I run the exact same command in my web
> interface
> > Jenkins system as a build task, I get a permission denied.
> >
> >  It might be helpful to put commands in the script run from
> > Jenkins to print as much about the environment as possible,
> > including logged in account (whoami) and current group
> membership
> > (groups) and current working directory. Prefix the command
> which
> > fails with "echo" to make sure it is exactly the same as
> what you
> > type interactively.
> >
> > --
> > You received this message because you are subscribed to a topic
> in the
> > Google Groups "Jenkins Users" group.
> > To unsubscribe from this topic, visit
> >
> 
> https://groups.google.com/d/topic/jenkinsci-users/GXSmF6RfluM/unsubscribe?hl=en
> 
> .
>
> > To unsubscribe from this group and all its topics, send an email to
> > jenkinsci-use...@googlegroups.com .
> > For more options, visit https://groups.google.com/groups/opt_out
> .
> >  
> >  
>
>
> -- 
> Jonathan Rogers
>
> -- 
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/GXSmF6RfluM/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  


-- 
Jonathan Rogers

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails

Re: console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2013-03-08 Thread KimSia Sim
Thank you for your advice Jonathan!

I have solved the problem by restarting the Jenkins service.

I had to run the following command in my console.

sudo service jenkins restart

This restart works better than the web gui restart sequence.

For reasons unknown to me.

On Saturday, March 9, 2013 2:35:17 PM UTC+8, JonathanRRogers wrote:
>
> KimSia Sim wrote: 
> > Under build step execute shell command, I only have the following 
> > echo "running whoami" & whoami 
> > echo "running groups" & groups 
> > echo $PWD 
> > mkdir /var/virtual/stage.xxx.com/test1 
> > 
> > These are my results. 
> > + whoami 
> > jenkins 
> > + echo running whoami 
> > running whoami 
> > + groups 
> > nogroup 
> > + echo running groups 
> > running groups 
> > + echo /var/lib/jenkins/workspace/LTE develop 
> > /var/lib/jenkins/workspace/LTE develop 
> > + mkdir /var/virtual/stage.xxx.com/test1 
> > mkdir: cannot create directory `/var/virtual/stage.xxx.com/test1': 
> Permission denied 
> > Build step 'Execute shell' marked build as failure 
> > Finished: FAILURE 
> > What should I do next? 
>
> As you can see from your above output, the Jenkins process is running as 
> a member of the "nogroup" group, not "www-data". This probably means 
> that user "jenkins" is not listed as member of "www-data" in /etc/group. 
> Alternatively, the script which starts Jenkins or Jenkins itself could 
> be explicitly changing the group membership. You need to determine why 
> Jenkins is not running with the group membership you expect. Keep in 
> mind that group membership is determined at process start time so you 
> have to restart Jenkins after changing /etc/group to see any effects. 
>
> BTW, in a shell script the "&" character means to run the preceeding 
> command in the background, which probably not what you intended as the 
> reason that the output order is odd. Use ';' to separate two commands 
> but execute them sequentially. 
>
> > 
> > On Saturday, March 9, 2013 12:46:39 AM UTC+8, JonathanRRogers wrote: 
> > 
> > 
> > 
> > On Friday, March 8, 2013 4:51:04 AM UTC-5, KimSia Sim wrote: 
> > 
> > I have this command 
> > 
> > mkdir /var/virtual/folder 
> > 
> > I can execute this when I ssh into my server as `jenkins` 
> > 
> > /var/virtual belongs to www-data, but not an issue because I 
> > made /var/virtual 775 and `jenkins` is a member of `www-data` 
> > group 
> > 
> > 
> > However, when I run the exact same command in my web interface 
> > Jenkins system as a build task, I get a permission denied. 
> > 
> >  It might be helpful to put commands in the script run from 
> > Jenkins to print as much about the environment as possible, 
> > including logged in account (whoami) and current group membership 
> > (groups) and current working directory. Prefix the command which 
> > fails with "echo" to make sure it is exactly the same as what you 
> > type interactively. 
> > 
> > -- 
> > You received this message because you are subscribed to a topic in the 
> > Google Groups "Jenkins Users" group. 
> > To unsubscribe from this topic, visit 
> > 
> https://groups.google.com/d/topic/jenkinsci-users/GXSmF6RfluM/unsubscribe?hl=en.
>  
>
> > To unsubscribe from this group and all its topics, send an email to 
> > jenkinsci-use...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
>
>
> -- 
> Jonathan Rogers 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2013-03-08 Thread Jonathan Rogers
KimSia Sim wrote:
> Under build step execute shell command, I only have the following
> echo "running whoami" & whoami
> echo "running groups" & groups
> echo $PWD
> mkdir /var/virtual/stage.xxx.com/test1
>
> These are my results.
> + whoami
> jenkins
> + echo running whoami
> running whoami
> + groups
> nogroup
> + echo running groups
> running groups
> + echo /var/lib/jenkins/workspace/LTE develop
> /var/lib/jenkins/workspace/LTE develop
> + mkdir /var/virtual/stage.xxx.com/test1
> mkdir: cannot create directory `/var/virtual/stage.xxx.com/test1': Permission 
> denied
> Build step 'Execute shell' marked build as failure
> Finished: FAILURE
> What should I do next?

As you can see from your above output, the Jenkins process is running as
a member of the "nogroup" group, not "www-data". This probably means
that user "jenkins" is not listed as member of "www-data" in /etc/group.
Alternatively, the script which starts Jenkins or Jenkins itself could
be explicitly changing the group membership. You need to determine why
Jenkins is not running with the group membership you expect. Keep in
mind that group membership is determined at process start time so you
have to restart Jenkins after changing /etc/group to see any effects.

BTW, in a shell script the "&" character means to run the preceeding
command in the background, which probably not what you intended as the
reason that the output order is odd. Use ';' to separate two commands
but execute them sequentially.

>
> On Saturday, March 9, 2013 12:46:39 AM UTC+8, JonathanRRogers wrote:
>
>
>
> On Friday, March 8, 2013 4:51:04 AM UTC-5, KimSia Sim wrote:
>
> I have this command
>
> mkdir /var/virtual/folder
>
> I can execute this when I ssh into my server as `jenkins`
>
> /var/virtual belongs to www-data, but not an issue because I
> made /var/virtual 775 and `jenkins` is a member of `www-data`
> group
>
>
> However, when I run the exact same command in my web interface
> Jenkins system as a build task, I get a permission denied.
>
>  It might be helpful to put commands in the script run from
> Jenkins to print as much about the environment as possible,
> including logged in account (whoami) and current group membership
> (groups) and current working directory. Prefix the command which
> fails with "echo" to make sure it is exactly the same as what you
> type interactively.
>
> -- 
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/GXSmF6RfluM/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  


-- 
Jonathan Rogers

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2013-03-08 Thread KimSia Sim
I had a relevation when I logged in to my Console as jenkins and I run 
groups


I saw

nogroup sudo www-data

but in the window shell command of the build step, I only had

nogroup

I suspect this is the reason.

How do I overcome this problem? I have already tried restarting my jenkins.

It is still running as nogroup

On Saturday, March 9, 2013 2:21:33 PM UTC+8, KimSia Sim wrote:
>
> Under build step execute shell command, I only have the following
>
>
> echo "running whoami" & whoami
> echo "running groups" & groups
> echo $PWD
> mkdir /var/virtual/stage.xxx.com/test1
>
>
> These are my results.
>
> + whoami
> jenkins
> + echo running whoami
> running whoami
> + groups
> nogroup
> + echo running groups
> running groups
> + echo /var/lib/jenkins/workspace/LTE develop
> /var/lib/jenkins/workspace/LTE develop
> + mkdir /var/virtual/stage.xxx.com/test1
> mkdir: cannot create directory `/var/virtual/stage.xxx.com/test1': Permission 
> denied
> Build step 'Execute shell' marked build as failure
> Finished: FAILURE
>
>
> What should I do next?
>
>
> On Saturday, March 9, 2013 12:46:39 AM UTC+8, JonathanRRogers wrote:
>>
>>
>>
>> On Friday, March 8, 2013 4:51:04 AM UTC-5, KimSia Sim wrote:
>>>
>>> I have this command
>>>
>>> mkdir /var/virtual/folder
>>>
>>> I can execute this when I ssh into my server as `jenkins`
>>>
>>> /var/virtual belongs to www-data, but not an issue because I made 
>>> /var/virtual 775 and `jenkins` is a member of `www-data` group
>>>
>>>
>>> However, when I run the exact same command in my web interface Jenkins 
>>> system as a build task, I get a permission denied.
>>>
>>>  It might be helpful to put commands in the script run from Jenkins to 
>> print as much about the environment as possible, including logged in 
>> account (whoami) and current group membership (groups) and current working 
>> directory. Prefix the command which fails with "echo" to make sure it is 
>> exactly the same as what you type interactively.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2013-03-08 Thread KimSia Sim


Under build step execute shell command, I only have the following


echo "running whoami" & whoami
echo "running groups" & groups
echo $PWD
mkdir /var/virtual/stage.xxx.com/test1


These are my results.

+ whoami
jenkins
+ echo running whoami
running whoami
+ groups
nogroup
+ echo running groups
running groups
+ echo /var/lib/jenkins/workspace/LTE develop
/var/lib/jenkins/workspace/LTE develop
+ mkdir /var/virtual/stage.xxx.com/test1
mkdir: cannot create directory `/var/virtual/stage.xxx.com/test1': Permission 
denied
Build step 'Execute shell' marked build as failure
Finished: FAILURE


What should I do next?


On Saturday, March 9, 2013 12:46:39 AM UTC+8, JonathanRRogers wrote:
>
>
>
> On Friday, March 8, 2013 4:51:04 AM UTC-5, KimSia Sim wrote:
>>
>> I have this command
>>
>> mkdir /var/virtual/folder
>>
>> I can execute this when I ssh into my server as `jenkins`
>>
>> /var/virtual belongs to www-data, but not an issue because I made 
>> /var/virtual 775 and `jenkins` is a member of `www-data` group
>>
>>
>> However, when I run the exact same command in my web interface Jenkins 
>> system as a build task, I get a permission denied.
>>
>>  It might be helpful to put commands in the script run from Jenkins to 
> print as much about the environment as possible, including logged in 
> account (whoami) and current group membership (groups) and current working 
> directory. Prefix the command which fails with "echo" to make sure it is 
> exactly the same as what you type interactively.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2013-03-08 Thread JonathanRRogers


On Friday, March 8, 2013 4:51:04 AM UTC-5, KimSia Sim wrote:
>
> I have this command
>
> mkdir /var/virtual/folder
>
> I can execute this when I ssh into my server as `jenkins`
>
> /var/virtual belongs to www-data, but not an issue because I made 
> /var/virtual 775 and `jenkins` is a member of `www-data` group
>
>
> However, when I run the exact same command in my web interface Jenkins 
> system as a build task, I get a permission denied.
>
>  It might be helpful to put commands in the script run from Jenkins to 
print as much about the environment as possible, including logged in 
account (whoami) and current group membership (groups) and current working 
directory. Prefix the command which fails with "echo" to make sure it is 
exactly the same as what you type interactively.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




console run as jenkins i can mkdir, but when i run mkdir in build task, i get permission denied

2013-03-08 Thread KimSia Sim
I have this command

mkdir /var/virtual/folder

I can execute this when I ssh into my server as `jenkins`

/var/virtual belongs to www-data, but not an issue because I made 
/var/virtual 775 and `jenkins` is a member of `www-data` group


However, when I run the exact same command in my web interface Jenkins 
system as a build task, I get a permission denied.

I am running  Jenkins ver. 1.504  Please advise.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.