当前位置:网站首页>unable to execute xxx. SH: operation not permitted
unable to execute xxx. SH: operation not permitted
2022-07-02 04:17:00 【Mingmingruyue senior】
One 、 background
Previously created locally shell Script , stay iterm in cd Go to the directory , Can pass ./xxx.sh The way to execute .
Today, I suddenly found the following error :
unable to execute xxx.sh : Operation not permitted
perhaps
-bash: ./xxx.sh: /usr/bin/env: bad interpreter: Operation not permitted
Recently upgraded the system to Monterey edition , The suspicion has something to do with the system upgrade .
Two 、 Analysis methods
ls -l View permissions 
It is found that you have execution permission
Use ls [email protected] To view additional properties 
Search several attributes inside and find some clues
The apple system has one GateKeeper protection mechanism ( since OSX 10.5 Join in ). Files downloaded from the Internet , Will be automatically marked com.apple.quarantine sign , Immune isolation , The system limits the file according to this additional attribute .
3、 ... and 、 terms of settlement
sudo xattr -r -d com.apple.quarantine + Directory path
Enter the system password .

After setting up perform ./test.sh It's found to work properly
It's not easy to create , If this article helps you , Welcome to thumb up 、 Collection and attention , Your support and encouragement , It's the biggest driving force of my creation .
边栏推荐
- C language guessing numbers game
- 向数据库中存入数组数据,代码出错怎么解决
- A summary of common interview questions in 2022, including 25 technology stacks, has helped me successfully get an offer from Tencent
- Yyds dry inventory compiler and compiler tools
- Hands on deep learning (II) -- multi layer perceptron
- Where can I buy cancer insurance? Which product is better?
- Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
- WPViewPDF Delphi 和 .NET 的 PDF 查看组件
- Pytorch---使用Pytorch实现U-Net进行语义分割
- Li Kou interview question 02.08 Loop detection
猜你喜欢

Installation and use of blue lake

Li Kou interview question 02.08 Loop detection

What is 5g industrial wireless gateway? What functions can 5g industrial wireless gateway achieve?

pip 安装第三方库
![[ibdfe] matlab simulation of frequency domain equalization based on ibdfe](/img/a1/441f400668e736b70cb36443f2267a.png)
[ibdfe] matlab simulation of frequency domain equalization based on ibdfe

阿里云polkit pkexec 本地提权漏洞

Pytorch---使用Pytorch进行图像定位

Spring recruitment of Internet enterprises: Kwai meituan has expanded the most, and the annual salary of technical posts is up to nearly 400000

Analysis of the overall design principle of Nacos configuration center (persistence, clustering, information synchronization)

PIP installation of third-party libraries
随机推荐
Yolov5网络修改教程(将backbone修改为EfficientNet、MobileNet3、RegNet等)
C语言:逻辑运算和判断选择结构例题
How to solve the code error when storing array data into the database
WiFi 5GHz frequency
"No war on the Western Front" we just began to love life, but we had to shoot at everything
Playing with concurrency: what are the ways of communication between threads?
Recyclerview add header
cookie、session、tooken
5g era is coming in an all-round way, talking about the past and present life of mobile communication
Introduction to JSON usage scenarios and precautions
A summary of common interview questions in 2022, including 25 technology stacks, has helped me successfully get an offer from Tencent
The confusion I encountered when learning stm32
Go branch and loop
First acquaintance with P4 language
What is 5g industrial wireless gateway? What functions can 5g industrial wireless gateway achieve?
Go language introduction
手撕——排序
Lei Jun wrote a blog when he was a programmer. It's awesome
Wechat applet JWT login issue token
Handling of inconsistency between cursor and hinttext position in shutter textfield
