anyone know why this occurs and how to fix when i open the terminal
bash: /home/user/.bashrc: Permission denied
sudo chmod -R 777 /home/user/.bashrc
anyone know why this occurs and how to fix when i open the terminal
bash: /home/user/.bashrc: Permission denied
sudo chmod -R 777 /home/user/.bashrc
It says this is solved?? I’m really confused? There’s only one post and no solution??
The solution was sudo chmod line
Are you sure 777 is the right permission for .bashrc?
Mine seems to have 644:
-rw-r--r--
Looks like they tried some random command they found on the internet.
Highly probable!
You are right I have been googling for days.
this has solved to me the bash: /home/user/.bashrc: Permission denied
if you have a solution please share, I am new to endeavor have been using
Linux Mint Mate for about 5 years and never seen that on the terminal.
the underlying question is why the permissions are wrong in the first place
chmod 644 ~/.bashrc
should be the right one… and if your user is not the owner I would bet you need to check more than bashrc for the right owner and permissions…
I think the question is more about why you need to change the permissions in the first place?
Were you using sudo
on files/folders in your home folder?
What does find ~ ! -user $USER -ls
show? If you have files owned by anybody except you (such as root), this command should list them.
As said and implied here, the problem may emerge from using sudo for everything.
Sudo should not be used for every command!
Sudo may be needed when changing stuff in the system.
But sudo should not be needed when changing stuff under your $HOME folder (unless you already have used it there before, thus making files/folders to be root owned).
from the cmd line find ~ ! -user $USER -ls
everthing is root.
I am a novice really copy/paste is my forte had no problem like this in Mint
[johnny@johnny-desktop ~]$ find ~ ! -user $USER -ls
10355576 4 drwxr-xr-x 3 root root 4096 gru 30 07:30 /home/johnny/yay
10355741 4 -rw-r–r-- 1 root root 537 gru 30 07:30 /home/johnny/yay/.SRCINFO
10355578 4 drwxr-xr-x 8 root root 4096 gru 30 07:30 /home/johnny/yay/.git
10617843 4 drwxr-xr-x 4 root root 4096 gru 30 07:30 /home/johnny/yay/.git/objects
10617844 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/objects/pack
10617847 16 -r–r–r-- 1 root root 12664 gru 30 07:30 /home/johnny/yay/.git/objects/pack/pack-43a037b9d128946e4194ddc1d3ce39df183f099b.idx
10617846 88 -r–r–r-- 1 root root 88158 gru 30 07:30 /home/johnny/yay/.git/objects/pack/pack-43a037b9d128946e4194ddc1d3ce39df183f099b.pack
10617845 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/objects/info
10355686 4 -rw-r–r-- 1 root root 23 gru 30 07:30 /home/johnny/yay/.git/HEAD
10355681 4 -rw-r–r-- 1 root root 73 gru 30 07:30 /home/johnny/yay/.git/description
10617852 4 drwxr-xr-x 3 root root 4096 gru 30 07:30 /home/johnny/yay/.git/logs
10617857 4 -rw-r–r-- 1 root root 179 gru 30 07:30 /home/johnny/yay/.git/logs/HEAD
10617853 4 drwxr-xr-x 4 root root 4096 gru 30 07:30 /home/johnny/yay/.git/logs/refs
10617858 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/logs/refs/heads
10617859 4 -rw-r–r-- 1 root root 179 gru 30 07:30 /home/johnny/yay/.git/logs/refs/heads/master
10617854 4 drwxr-xr-x 3 root root 4096 gru 30 07:30 /home/johnny/yay/.git/logs/refs/remotes
10617855 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/logs/refs/remotes/origin
10617856 4 -rw-r–r-- 1 root root 179 gru 30 07:30 /home/johnny/yay/.git/logs/refs/remotes/origin/HEAD
10355687 4 -rw-r–r-- 1 root root 114 gru 30 07:30 /home/johnny/yay/.git/packed-refs
10355685 4 -rw-r–r-- 1 root root 258 gru 30 07:30 /home/johnny/yay/.git/config
10355682 4 drwxr-xr-x 5 root root 4096 gru 30 07:30 /home/johnny/yay/.git/refs
10617842 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/refs/tags
10355683 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/refs/heads
10355688 4 -rw-r–r-- 1 root root 41 gru 30 07:30 /home/johnny/yay/.git/refs/heads/master
10617849 4 drwxr-xr-x 3 root root 4096 gru 30 07:30 /home/johnny/yay/.git/refs/remotes
10617850 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/refs/remotes/origin
10617851 4 -rw-r–r-- 1 root root 32 gru 30 07:30 /home/johnny/yay/.git/refs/remotes/origin/HEAD
10355684 4 -rw-r–r-- 1 root root 289 gru 30 07:30 /home/johnny/yay/.git/index
10355680 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/branches
10355678 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/info
10355679 4 -rw-r–r-- 1 root root 240 gru 30 07:30 /home/johnny/yay/.git/info/exclude
10355632 4 drwxr-xr-x 2 root root 4096 gru 30 07:30 /home/johnny/yay/.git/hooks
10355636 4 -rwxr-xr-x 1 root root 2783 gru 30 07:30 /home/johnny/yay/.git/hooks/push-to-checkout.sample
10355655 4 -rwxr-xr-x 1 root root 1643 gru 30 07:30 /home/johnny/yay/.git/hooks/pre-commit.sample
10355633 8 -rwxr-xr-x 1 root root 4655 gru 30 07:30 /home/johnny/yay/.git/hooks/fsmonitor-watchman.sample
10355673 4 -rwxr-xr-x 1 root root 1374 gru 30 07:30 /home/johnny/yay/.git/hooks/pre-push.sample
10355677 8 -rwxr-xr-x 1 root root 4898 gru 30 07:30 /home/johnny/yay/.git/hooks/pre-rebase.sample
10355676 4 -rwxr-xr-x 1 root root 3650 gru 30 07:30 /home/johnny/yay/.git/hooks/update.sample
10355675 4 -rwxr-xr-x 1 root root 416 gru 30 07:30 /home/johnny/yay/.git/hooks/pre-merge-commit.sample
10355670 4 -rwxr-xr-x 1 root root 189 gru 30 07:30 /home/johnny/yay/.git/hooks/post-update.sample
10355671 4 -rwxr-xr-x 1 root root 1492 gru 30 07:30 /home/johnny/yay/.git/hooks/prepare-commit-msg.sample
10355674 4 -rwxr-xr-x 1 root root 424 gru 30 07:30 /home/johnny/yay/.git/hooks/pre-applypatch.sample
10355634 4 -rwxr-xr-x 1 root root 544 gru 30 07:30 /home/johnny/yay/.git/hooks/pre-receive.sample
10355672 4 -rwxr-xr-x 1 root root 896 gru 30 07:30 /home/johnny/yay/.git/hooks/commit-msg.sample
10355669 4 -rwxr-xr-x 1 root root 478 gru 30 07:30 /home/johnny/yay/.git/hooks/applypatch-msg.sample
10355742 4 -rw-r–r-- 1 root root 46 gru 30 07:30 /home/johnny/yay/.gitignore
10355743 4 -rw-r–r-- 1 root root 1330 gru 30 07:30 /home/johnny/yay/PKGBUILD
find: ‘/home/johnny/.cache/yay/gcc9/pkg’: Permission denied
7340035 4 -rw-r–r-- 1 root root 2691 gru 26 16:25 /home/johnny/.bashrc
Ithink this all stems from a failed install of GTKLP for printer
And the root cause of some problems?
You should change back the ownership of your files under your home to your user:
sudo chown -R -v $USER:$USER /home/$USER
Does command
echo $LOGNAME
show johnny
?
If so, you can make your $HOME files owned by you instead of root with this command:
sudo chown -R $LOGNAME:$LOGNAME $HOME
That sounds like a ticking time bomb. copy/paste with sudo random commands in any Linux distro is dangerous and going to break things.
yes it shows johnny
So you can try the command.
EDIT: then make your $HOME folder usable only by you:
sudo chmod go-rwx $HOME
Afterwards do not use sudo commands for your $HOME folder files!
WOW every file was root
except
[johnny@johnny-desktop ~]$ find ~ ! -user $USER -ls
find: ‘/home/johnny/.cache/yay/gcc9/pkg’: Permission denied
I think this all stems from a failed install of GTKLP for printer
I see I am way out of my depth with endeavor as a daily user
and for not reading the manual about printing with CUPS
Perhaps, but random sudo copy/paste will break any of your Linux systems…
If you need help with your printer open a new thread and you will generally get help. This is a friendly community and if you are willing to learn you will be able to. If you feel out of your depth and prefer dabbling in mint or other for a while that is ok too. The main difference is that eos gives you a minimal system and let’s you build on top of it. Keep it simple at the beginning and it shouldn’t create trouble.
I guess at this point it would be appropriate to mark the post as solved.