mac notebook catalina Permission denied bash
mac notebook catalina Permission denied bash
mac notebook catalina Permission denied bash
So your .zprofile is trying to call .bash_profile, but this file is not executable.
You could change the first line to
source ~/.bash_profile
or use chmod to give .bas_profile “execute” permission by typing in Terminal:
chmod u+x ~/.bash_profile
So your .zprofile is trying to call .bash_profile, but this file is not executable.
You could change the first line to
source ~/.bash_profile
or use chmod to give .bas_profile “execute” permission by typing in Terminal:
chmod u+x ~/.bash_profile
rudolfusa wrote:
rudolf@Rudolfs-MacBook-Pro-new ~ % ls -la ~/.zprofile
-rw-r--r--@ 1 rudolf staff 18 Aug 19 12:02 /Users/rudolf/.zprofile
rudolf@Rudolfs-MacBook-Pro-new ~ %
That seems ok.
Since there is no .zprofile created by default, I suppose you may have created or some software that you installed did.
Can you post just the first few lines of it?
They can be produced for example by typing the following in Terminal:
head -10 ~/.zprofile
The correct filename is ~/.zprofile, not ~/.zprofile:1. Zsh will read a ~/.zshrc file whether as a new login shell, or as an interactive shell. I do not believe that ~/.zprofile is read under both conditions.
Your ~/.zprofile permissions should be 644 or (-rw-r--r--), in group staff, and with you as the owner.
What is the output of the following command in Terminal:
ls -la ~/.zprofile
Not every Bashism is compatible with Zsh, and just blithely attempting to source ~/.bash_profile may not result in what you are hoping. The PS1 shell prompt syntax is entirely different in Zsh than in Bash.
You could rename the ~/.zprofile to ~/.zshrc.
Here is my ~/.zshrc contents. Note that I am using homebrew and not MacPorts as a package manager and that is why my PATH is configured to look in /usr/local/bin.
# .zshrc
export PATH=".:$HOME/bin:/usr/local/bin:$PATH"
export MANPATH=".:/user/local/share/man:/usr/share/man:$MANPATH"
TPUT="/usr/bin/tput"
Bluebld="$(${TPUT} bold; ${TPUT} setaf 63)"
White="$(${TPUT} bold; ${TPUT} setaf 15)"
Green="$(${TPUT} bold; ${TPUT} setaf 42)"
Normal="$(${TPUT} sgr0)"
# don't want VPN DNS changing my hostname
MyHost="$(networksetup -getcomputername)"
export CLICOLOR=1
# [e]grep matches are quite yellow
export GREP_COLOR='00;38;5;226'
export GREP_OPTIONS='--color=auto --extended-regexp'
export LSCOLORS='gxfxcxdxbxegedabagacad'
export HOMEBREW_NO_ANALYTICS=1
PS1="%{${Green}%}${MyHost}: %~ %% %{${White}%}"
# command-line editing using vi/vim
bindkey -v
alias tt='open -a Textastic "$@"'
Anything else you can add which might make it possible to determine what problem you are having?
I am working on mac notebook pro, catalina 10.15.6. On starting the terminal I get "/Users/rudolf/.zprofile:1: permission denied"
how can this be solved?
rudolf@Rudolfs-MacBook-Pro-new ~ % ls -la ~/.zprofile
-rw-r--r--@ 1 rudolf staff 18 Aug 19 12:02 /Users/rudolf/.zprofile
rudolf@Rudolfs-MacBook-Pro-new ~ %
how do I do this?
thanks:
Last login: Thu Aug 20 17:49:51 on ttys001
/Users/rudolf/.zprofile:1: permission denied: /Users/rudolf/.bash_profile
rudolf@Rudolfs-MacBook-Pro-new ~ % head -10 ~/.zprofile
~/.bash_profile
##
# Your previous /Users/rudolf/.zprofile file was backed up as /Users/rudolf/.zprofile.macports-saved_2020-08-20_at_17:57:01
##
# MacPorts Installer addition on 2020-08-20_at_17:57:01: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
rudolf@Rudolfs-MacBook-Pro-new ~ %
mac notebook catalina Permission denied bash