Thanks Torvalds for your clear-cut answer, I really appreciate that. On another hand, I would like to suggest that Linux files should have an additional permission bit to be granted arbitrary attributes access, especially for the atime, ctime and mtime. The reason is because in production data pipeline, we often need multiple people to get/set the same file's modification times arbitrarily (e.g., set an output file's mtime according to the input file for incremental processing), and this process is managed by several people. So now, we have to run our data processing pipeline as root which is risky and undesirable. This can be implemented either: - as a single bit in file attributes along with the 7777 (i.e., setUID bit, setGID bit, sticky bit, user-3-bits, group-3-bits, others-3-bits), I would call it group-attribute-bit to allow users in the same group to modify its timestamp arbitrarily. or - as an extra bit in user/group/other, so that it become 7FFF (it is nice to have 4-bits for user/group/other, because 4 bits make up for one hexadecimal digit😁) Thank you very much for your consideration! Cheers, Xuancong On Tue, Aug 15, 2023 at 2:29 PM Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxx> wrote: > > On Tue, 15 Aug 2023 at 06:11, Xuancong Wang <xuancong84@xxxxxxxxx> wrote: > > > > Yes, by "full access", I mean `chmod 777`. You can easily reproduce > > this bug on any Linux machine by typing the following commands: > > This is how things are supposed to work. The 0777 permissions mean > that you can read, write and execute the file. They do not mean that > you own the file. > > As a non-owner, you can set the access and modification times the > same way you could by just reading and writing to the file. So if you > set mtime, you have to set ctime ("change time") too. > > To actually change times arbitrarily and with other patterns, you need > to actually own the file. > > Linus