On 08.06.17 18:50, R. Tyler Croy wrote:
> (replies inline)
>
> On Thu, 08 Jun 2017, Changqin Xie wrote:
>
>> Using the following Jenkinsfile:
>> #!/usr/bin/env groovy
>>
>> pipeline {
>> agent any
>>
>> stages {
>> stage('Deploy') {
>> steps {
>> sh 'echo $HOME'
>> }
>> }
>> }
>> }
>>
>> And I get $HOME == /var/www
>> Why isn't it being "/home/www-data"? By the way, I am running Jenkins under
>> the user www-data.
>
> I would be willing to bet that the home directory for the www-data user is
> actually set to `/var/www` in /etc/passwd.
>
> Most Linux packages set the home-directory for that user to /var/www
>
>
>
> - R. Tyler Croy
>
> ------------------------------------------------------
> Code: <https://github.com/rtyler>
> Chatter: <https://twitter.com/agentdero>
> xmpp: [email protected]
>
> % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
> ------------------------------------------------------
>
If you're working with Debian and/or its derivatives, default user for
webserver is www-data, group www-data and the default home directory for
that user is /var/www
Check if this string exists if /etc/passwd
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
BTW, in RedHat, CentOS, Fedora, etc. user is apache, group apache and
the home dir is /usr/share/httpd
Cheers,
Kirill
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/08937b3e-e722-a604-7f66-2b969725703f%40paranoid.email.
For more options, visit https://groups.google.com/d/optout.