How to solve the “You don't have permission to open the application” in Mac OS big sur?

When I want to open an app which I've downloaded outside of app store a pop up with the message of You dont have permission to open this app shows up.

enter image description here

My laptop is macbook pro 2020 m1 big sur version 11.1

enter image description here

I've checked of my user is the administrator or not and I found that I'm the only admin account on this laptop :

enter image description here

I've also tried to open app with rosetta but didn't work either and also tried to make all users able to read and write in the permissions of the app info .

enter image description here

I hope anyone could help me open such apps . Thanks in advance .


I solved the issue by running two commands in terminal for this app :

sudo chmod -R 755 /path/to/app.
 
sudo xattr -dr com.apple.quarantine /path/to/app.