Permission denied when I try to change a file’s access and modification times
The command should be touch -t (date) file.example

chmod +x just makes the file executable – it should not affect the date - but if you still want to use it, you can do it like this:

chmod +x file.example
touch -t 0401200 file.example


Also, check that you have write permissions on the file by running ls -l file.example (or right-click on the file in Finder and choose Get Info, then look at 'Sharing &amp; Permissions').