coreutils
[Top][All Lists]
Advanced

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

Anyone can modify the modification time of a symbolic link owned by root


From: develop
Subject: Anyone can modify the modification time of a symbolic link owned by root
Date: Wed, 14 Apr 2021 14:08:53 -0400

As a regular user I am able to update the modification time of symbolic links 
that are owned by root.

Is this intentional? Other than making the device read only is there any other 
way to prevent this?

I realize that using the command "ls -l" shows up as all users having write 
permissions on the symbolic link. Just wondering what the reasoning is to allow 
any user to change the modification time. It would seem to be more logical if 
only the owner (group?) could change the modification time.

Thanks in advance.

- Nobes


More info below....

Given the following directory listing:
-rw-r--r--  1 root root     0 Apr 14 09:39 test
lrwxrwxrwx  1 root root     4 Apr 14 13:18 test2 -> test

I could execute the following command to change the modification time of the 
actual symbolic link owned by root. The command I used is:
> touch -h test2


System details:

> touch --version
   touch (GNU coreutils) 8.28
   Copyright (C) 2017 Free Software Foundation, Inc.
   ...

> uname -a
   Linux main 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 
x86_64 x86_64 x86_64 GNU/Linux




reply via email to

[Prev in Thread] Current Thread [Next in Thread]