The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.bashrc does not work

Discussion in 'General Discussion' started by DimaM, Aug 31, 2003.

  1. DimaM

    DimaM Guest

    Hello.

    I have a problem setting up .bashrc file for my customer.
    As I see CPanel doesn't create bashrc file in user accounts by default. When I create it by myself and add a string
    alias ls='ls -l'
    then reconnect and type
    ls
    I see simple output, not from "ls -l". So I assume bashrc file or "alias" command from bashrc doesn't work.

    But, if I try to do that with "root" account, it does work.

    Any ideas?

    I am running RedHat Linux 7.3 with latest CPanel build.
    Thank you.

    cPanel.net Support Ticket Number:
     
  2. rbmatt

    rbmatt Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    The jailcell does not yet support configuration files like this.
    I have contacted Nick about it, and it should eventually be implemented.

    cPanel.net Support Ticket Number:
     
  3. DimaM

    DimaM Guest

    Thank you for your response, but what if I use normal shell, not jailed?
    I was under impression that normal shell (/bin/bash) allows such things. Is it possible that CPanel developers modified /bin/bash to remove ability to use .bashrc for normal users ?

    cPanel.net Support Ticket Number:
     
  4. Nameless

    Nameless Member

    Joined:
    Feb 25, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Did you setup right owner of .bashrc and right permissions? And is user shell bash?(not sh or any oter)?

    cPanel.net Support Ticket Number:
     
  5. DimaM

    DimaM Guest

    Yes, owner is correct because I created .bashrc under that user,
    permissions is 644 and the shell is /bin/bash
    Here is content of .bashrc

    alias try='ls -l'

    When I log in and type:
    bash-2.05a$ try
    I see:
    bash: try: command not found

    Any ideas?

    cPanel.net Support Ticket Number:
     
  6. Nameless

    Nameless Member

    Joined:
    Feb 25, 2003
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Create file .bash_profile(or check it if exists) and add this text:

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    Then relogin to your account and check your alias.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page