Why does my job die with an error like one of these: Cannot write to file, File I/O error, Failed to write, Cannot open?

This is likely to be a quota problem; check your quota and request an increase if needed.

It could also be that you are trying to write to an unavailable directory; does the destination directory exist on the node you're running on? Note that project spaces are available on interactive nodes but not compute nodes for most HPC systems, so jobs cannot read from or write to project spaces while running on compute nodes.

To create files in a destination directory you must have permission to write to the directory. To edit a file you must have permission to write to the file. To list the contents of a directory including the associated Linux permissions use the command:

ls -l