Uploading error - "Permission Denied"

Hey everyone,
I am getting this error message whenever I try to upload codes. I am using an Arduino Mega.
Can anyone help me to find out what’s wrong with this?
Thank You <3

What happens if you save the sketch first?

pert:
What happens if you save the sketch first?

The same thing happens when I try to save. I get this error.

It appears you are trying to create a file somewhere you are not allowed to. Do any of the directories you are using have restricted access or set to read only perhaps?

Try creating a new project and then copy the source code from your current one into the new one and see if it compiles then.