You are not logged in.

#1 2014-05-06 12:30:50

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

bash: /etc/bash.bashrc: Permission denied

1 out of 5 times when I open a terminal emulator I got the message

bash: /etc/bash.bashrc: Permission denied

The permissions are OK, 655 both the /etc folder and the bash.bashrc (755 doesn't help either). However the error message seemingly does not effect the login and the function of the emulators but I just can't figure out why I get this if everything is fine and working. Also when this occurs the name of the terminal window changes to terminal or xterm.
Here's the file itself which arrived as a .pacnew file but before I switched them I've had this problem anyway:

#
# /etc/bash.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '

case ${TERM} in
  xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'

    ;;
  screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
    ;;
esac

[ -r /usr/share/bash-completion/bash_completion   ] && . /usr/share/bash-completion/bash_completion

Last edited by freyr (2014-05-06 12:31:37)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#2 2014-05-06 12:43:31

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,723
Website

Re: bash: /etc/bash.bashrc: Permission denied

655 is a daft set of permissions for a directory, not that it matters too much when root's the owner.

What is the output of

ls -l /usr/share/bash-completion/bash_completion

and

lsattr /usr/share/bash-completion/bash_completion /etc/bash.bashrc

If bash_completion exists, can you post the contents.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2014-05-06 12:52:29

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: bash: /etc/bash.bashrc: Permission denied

-rw-r--r-- 1 root root 68065 ápr   23 03.08 /usr/share/bash-completion/bash_completion

and

-------------e-- /usr/share/bash-completion/bash_completion
-------------e-- /etc/bash.bashrc

What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#4 2014-05-06 19:49:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: bash: /etc/bash.bashrc: Permission denied

$ ls -l /etc/bash.bashrc
-rw-r--r-- 1 root root 715 Mar 23 01:25 /etc/bash.bashrc

Offline

Board footer

Powered by FluxBB