Messages in this thread | | | Subject | Re: File open/create attibutes. | Date | Tue, 14 May 2002 17:43:03 +0100 (BST) | From | Alan Cox <> |
| |
> 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/
| |