The Permission Denied error on trades generally means you have Two-factor Authentication (2FA) for Trading turned on and are entering it incorrectly or not at all.
Depending on how you set it up, Trading 2FA can apply to:
- Creating new orders
- Cancelling open orders
- Closing spot positions on margin
If you are confident you are entering the correct 2FA code, see My Authenticator App 2FA code doesn't work for more details.