"mkdir: /Users/me/.bash_sessions: Operation not permitted" When I open Terminal, I get the following error

mkdir: /Users/me/.bash_sessions: Operation not permitted


Any idea why that may be the case?  Is there a solution?
More than likely the error message is produced by the file- /etc/bashrc_Apple_Terminal in the last line of this snippet:

# Set up the session directory/file.
SHELL_SESSION_DIR="$HOME/.bash_sessions"
SHELL_SESSION_FILE="$SHELL_SESSION_DIR/$TERM_SESSION_ID.session"
mkdir -m 700 -p "$SHELL_SESSION_DIR"


Operation not permitted would suggest some kind of a file lock. Edit your post with the following command and its output:

 ls -lOed $HOME