Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] .bashrc not being source correctly



Hi Jean-Christian,

I don't know about your setup, but on my machine, the user www-data
uses "sh" (not bash).

Regards,

Bruno.

On Fri, Aug 27, 2010 at 10:55, Jean-Christian Imbeault
<jc.imbeault@example.com> wrote:
> When I su to a different user I've noticed that my .bashrc doesn't
> seem to be sourced since the .bashrc_aliases isn't being used.
>
> Specifically:
>
> jci@example.com:~$ su - www-data
> www-data@example.com:~$ ls -a .bash*
> .bash_aliases  .bash_history  .bashrc
> www-data@example.com:~$ cat .bash_aliases
> alias ll="ls -l"
> www-data@example.com:~$ ll
> ll: command not found
>
> My .bashrc contains the following near the end of the file:
>
> if [ -f ~/.bash_aliases ]; then
>    . ~/.bash_aliases
> fi
>
> I know there is nothing wrong with the .bashrc since I can source it
> and then my alias works. So I'm guessing the .bashrc is not getting
> sourced at all when I do 'su - www-data'?
>
> Thanks!
>
> --
> To unsubscribe from this mailing list,
> please see the instructions at http://lists.tlug.jp/list.html
>
> The TLUG mailing list is hosted by the award-winning Internet provider
> ASAHI Net.
> Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/
>



-- 
2 + 2 = 5, for very large values of 2.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links