The usual way to use Jenkins is for the developer to commit his changes to a 
version control repository, which Jenkins will monitor and when it sees a new 
commit, Jenkins will check out a copy of the sources under the Jenkins work dir 
and then execute some commands, typically to build and test the software. 

I'm not entirely sure what you would hope to accomplish by having Jenkins mess 
about in the same directory you are working in. 

Anyway, if you wish to avoid the permission issue when Jenkins is running as 
another user, may I suggest you try https://github.com/stisti/jenkins-app 
instead. Jenkins-app will run Jenkins under your account. 

-- Sami

Josselin Pierre <pierre.j...@gmail.com> kirjoitti 7.11.2012 kello 18.05:

> Giving the admin right to a user depends on your system, not on Jenkins.
> I've never used a Mac, so I can't help you there.
> 
> However, good practice is often to NOT give admin right to a Jenkins user, 
> but just the rights it actually needs, and not be allowed to do no anything 
> everywhere.
> Jenkins should work on specific folders he owns.
> To change the owner of a folder, the linux command is "chown -R <<user>> 
> <<folder>>"
> 
> 
> 
> On Wednesday, November 7, 2012 3:49:51 PM UTC+1, rakesh wrote:
>> 
>> I see user info in: /Library/LaunchDaemons/org.jenkins-ci.plist
>> content of this .plist:
>> rpatel$ cat org.jenkins-ci.plist 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
>> "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
>> <plist version="1.0">
>> <dict>
>>     <key>StandardOutPath</key>
>>     <string>/var/log/jenkins/jenkins.log</string>
>>     <key>StandardErrorPath</key>
>>     <string>/var/log/jenkins/jenkins.log</string>
>>     <key>EnvironmentVariables</key>
>>     <dict>
>>         <key>JENKINS_HOME</key>
>>         <string>/Users/Shared/Jenkins/Home</string>
>>     </dict>
>>     <key>GroupName</key>
>>     <string>daemon</string>
>>     <key>KeepAlive</key>
>>     <true/>
>>     <key>Label</key>
>>     <string>org.jenkins-ci</string>
>>     <key>ProgramArguments</key>
>>     <array>
>>                 <string>/bin/bash</string>
>>         <string>/Library/Application 
>> Support/Jenkins/jenkins-runner.sh</string>
>>     </array>
>>     <key>RunAtLoad</key>
>>     <true/>
>>     <key>UserName</key>
>>     <string>jenkins</string>
>>         <key>SessionCreate</key>
>>     <true />
>> </dict>
>> </plist>
>> 
>> 
>> 
>> Now how do I have this user admin access ?
>> 
>> Thanks,
>> Rakesh
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On Tuesday, November 6, 2012 3:33:34 PM UTC-5, mgimza wrote:
>>> 
>>> 
>>> I am not sure about MAC, but on linux there is a config file that can be 
>>> modified to specify the user and group to which Jenkins should.
>>> 
>>> On Linux this file is  /etc/sysconfig/jenkins
>>> 
>>> 
>>> The variables to add/modify:
>>> # Unix user account that runs the Jenkins daemon
>>> # Be careful when you change this, as you need to update
>>> # permissions of $JENKINS_HOME and /var/log/jenkins.
>>> #
>>> JENKINS_USER="<your-user-id-for-jenkins>"
>>> JENKINS_GROUP="<your-group-for-jenkins>"
>>> 
>>> 
>>> 
>>> On Tue, Nov 6, 2012 at 2:54 PM, rakesh <rpa...@mobiquityinc.com> wrote:
>>>> Hi Josselin,
>>>> How do I check this?
>>>> 
>>>> -Rakesh
>>>> 
>>>> On Tuesday, November 6, 2012 2:43:39 PM UTC-5, Josselin Pierre wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> Another point to check is user rights : does jenkins' user have access to 
>>>>> this folder ?
>>>>> 
>>>>> 
>>>>> cheers, 
>>>>> Josselin
>>>>> 
>>>>> 
>>>>> 2012/11/6 Marek Gimza <marek...@gmail.com>
>>>>>> Rakesh,
>>>>>> 
>>>>>> Does this directory acutally exist?
>>>>>> 
>>>>>> /Users/rpatel/Documents/MobSources/XX_iOS
>>>>>> 
>>>>>> Can use cd to this dir manually?
>>>>>> 
>>>>>> Kind Regards,
>>>>>> Mgimza
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Tue, Nov 6, 2012 at 2:13 PM, rakesh <rpa...@mobiquityinc.com> wrote:
>>>>>>> I am fairly new user of Jenkins, just installed it on my local mac 
>>>>>>> machine. 
>>>>>>> I created a job to run few commands which run successfully from xterm, 
>>>>>>> though coming across following error on jenkins.
>>>>>>> Not sure what I am doing wrong here? 
>>>>>>> 
>>>>>>> Job is running:
>>>>>>> ------------------
>>>>>>> Execute shell:
>>>>>>> -----------------
>>>>>>> pwd
>>>>>>> cd /Users/rpatel/Documents/MobSources/XX_iOS
>>>>>>> cucumber --format json --out result.json
>>>>>>> 
>>>>>>> 
>>>>>>> ---------------------
>>>>>>> Console output:
>>>>>>> ---------------------
>>>>>>> Building in workspace 
>>>>>>> /Users/Shared/Jenkins/Home/workspace/XX-Calabash-iOS
>>>>>>> [XX-Calabash-iOS] $ /bin/sh -xe 
>>>>>>> /var/folders/c0/rzt3wbtj3j11yp13rfmhxyww00007c/T/hudson4166321227994340301.sh
>>>>>>> + pwd
>>>>>>> /Users/Shared/Jenkins/Home/workspace/XX-Calabash-iOS
>>>>>>> + cd /Users/rpatel/Documents/MobSources/XX_iOS
>>>>>>> /var/folders/c0/rzt3wbtj3j11yp13rfmhxyww00007c/T/hudson4166321227994340301.sh:
>>>>>>>  line 3: cd: /Users/rpatel/Documents/MobSources/XX_iOS: Not a directory
>>>>>>> Build step 'Execute shell' marked build as failure
>>>>>>> Finished: FAILURE
>>>>>>> 
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Rakesh
>>> 

Reply via email to