Unexpected behaviour on output redirection after update to 20.04

Tom H tomh0665 at gmail.com
Mon Apr 27 03:07:42 UTC 2020


On Sun, Apr 26, 2020 at 9:23 PM <ubuntu-users-list at thomas.freit.ag> wrote:
>
> since I updated from 19.10 to 20.04 on two machines, I have an
> unexpected behavior on output redirection, which fails for root
> (and worked before with 19.10):
>
> 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.




More information about the ubuntu-users mailing list