in reply to File permission

Sorry, forgot to login :-(

Hi!

On a CentOs box, a perl script creates some files, and chmod them 0666. Then these files are used by the ..users, and modified by other perl scripts.

I noticed that some of these files, from time to time, are set back to chmod 0644 and am unable to see what causes it. None of the scripts that are used, do this.

Any suggestion?

Thank you

Replies are listed 'Best First'.
Re^2: File permission
by ikegami (Patriarch) on Mar 13, 2009 at 21:24 UTC

    Some editors create a new file rather than overwriting an existing file. Once the new file is written, the old file is replaced with the new file. This prevents information loss in the event of an error.

    This could account for a change in permission. You can verify if this is happening by comparing the inode number of the file before and after the permission change.