Mac Terminal -z‘sh prompts Permission denied (VSCode prompts that there is no permission and cannot save the file)

1. Add permissions to files

A file has three permissions, read, write, and executable. Permission denied means there is no executable permission, so executable permission needs to be added.
1. Enter the terminal and cd to the directory of the file
2. Execute the command chmod a+x ./ file name


Two: Grant folder permissions
$ sudo chmod -R 777 Directory path
where -R is Refers to cascading applications to all subdirectories and files in the directory
777 means that all users have the highest permissions

770 means I have the authority

Guess you like

Origin blog.csdn.net/m0_60437766/article/details/133918533