INF: Chmod() on an Open File

ID Number: Q40349

5.x 6.00 6.00a 6.00ax 7.00

MS-DOS

Summary:

In Microsoft C versions 5.0, 5.1, 6.0, 6.0a, 6.0ax, and C/C++ version

7.0, when a file has been opened, it is not valid to perform a chmod()

on the file. Although some operating systems (for example, UNIX) allow

a program to change the permission of a file while it is open, MS-DOS

requires the file to be closed before performing this function.

Unusual results can occur, particularly when SHARE.EXE is installed,

if an attempt is made to chmod() on an open file. One of the results

is an error indicating the file is full, when only 1 byte is written

to an empty file.

Additional reference words: 5.00 5.10 6.00 6.00a 6.00ax 7.00