Re: A small bug in file access control that all have neglected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux