Oleg Verych wrote: > open() will change timestamp. `bash` and `dash` have very broken workarounds of > access() in `test` due to euid requirements. I.e. read-only fs for > root or various > selinux-like restrictions are not shown unless open() is used. > > So, it's better just to use stat64(), right? The whole point of access() originally seems to be so you can check the real-user permissions, as there is no reliable way to do that otherwise. euidaccess() was added much later. As noted, you can use open() instead. This is one reason why open() shouldn't change the timestamps: only reading and writing should do that. Windows has an additional open flag OF_EXIST, which lets you call the Windows equivalent of open() and just check if you can, with the specified open flags, without returning a handle. Perhaps Linux could copy that idea with an O_ACCESS flag to open()? -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html