Unexpected behaviour on output redirection after update to 20.04
ubuntu-users-list at thomas.freit.ag
ubuntu-users-list at thomas.freit.ag
Mon Apr 27 12:51:18 UTC 2020
Hi Tom,
On 27.04.20 05:07, Tom H wrote:
>> To reproduce:
>>
>> 1) create a file as user:
>> user at host:~$ echo `date` > /var/tmp/testfile
>> user at host:~$ ls -l /var/tmp/testfile
>> -rw-rw-r-- 1 user group 33 Apr 26 20:56 /var/tmp/testfile
>>
>> 2) redirect output as root to that file (append a line):
>> root at host:~# echo `date` >> /var/tmp/testfile
>> zsh: permission denied: /var/tmp/testfile
>>
>> I would expect, that root could just append to any file on a local
>> filesystem (ext4 in this case). This happens in bash as well.
>>
>> Any idea, what is the cause for this?
> Try it in the user's homedir. "/var/tmp" has the "1777" mode set.
Yes, that is a working an option. However it worked for /var/tmp (or other of the 1777
mode directories) before the upgrade. IIRC the sticky bit had only impact on file deletion
(only by the user, that created the file) in that directories.
Regards,
Thomas
More information about the ubuntu-users
mailing list