Unix File has 000 access when written

Good day!

I would just like to ask about an issue I encountered. There is a Java program (version1.3) that we use that is hosted in Unix (HP-UX B.11.11 U), and one of its functions copies a file and writes it to another directory. It usually runs fine, but one day, it wrote a file that had 000 access on it. As far as I know, this happened only once ever in the whole run of the system. This caused a lot of problems because the file couldn't be read or deleted.

Do you guys have any idea how the file could have been written with such an access? Aside from someone playing a really bad joke and running chmod on it? :confused:

Assuming the process works like others - someone set umask 777 and ran the code.

Deleting should still have worked, that is controlled by directory permissions:

tyler@mecgentoo ~ $ mkdir asdf
tyler@mecgentoo ~ $ cd asdf
tyler@mecgentoo ~/asdf $ touch this
tyler@mecgentoo ~/asdf $ chmod 000 this
tyler@mecgentoo ~/asdf $ ls -l
total 0
---------- 1 tyler users 0 Sep  1 12:17 this
tyler@mecgentoo ~/asdf $ rm this
rm: remove write-protected regular empty file `this'? y
tyler@mecgentoo ~/asdf $

So check the ownership and permissions of the directory.