I think the denial of access would be to the file, 'comments.txt' - not the script. If you have shell access, change permissions to make the file writable:
$ chmod 777 comments.txt
Dangerous! In the application, put in very strict input validation 😉 - or better yet store user comments in a db.
--ph