Re: File open/create attibutes.

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue May 14 2002 - 11:43:03 EST


> If a file exists with attributes, 0644, and it is opened with truncate
> and create with different attributes, it doesn't get those attributes.
> It's only if the file doesn't exist at all that it gets created with
> the new attributes.

This is correct behaviour. See IEEE Std 1003.1-2001. Its explicitly
specified that "If the file exists and is a regular file, and the file
is successfully opened O_RDWR or O_WRONLY, its length shall be truncated
to 0, and the mode and owner shall be unchanged"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:23 EST