On Wed, Jun 16, 2021 at 07:13:18PM -0400, Wietse Venema wrote: > Jeremiah Rothschild: > > /tmp is a separate filesystem: > > [root@c8vm ~]# grep tmp /etc/fstab > > /dev/mapper/rootvg-tmp /tmp ext4 defaults 1 2 > > [root@c8vm ~]# df -h /tmp > > Filesystem Size Used Avail Use% Mounted on > > /dev/mapper/rootvg-tmp 2.0G 6.1M 1.8G 1% /tmp > > > > and it appears the same as a root and non-root user: > > [root@c8vm ~]# id > > uid=0(root) gid=0(root) groups=0(root) > > [root@c8vm ~]# touch /tmp/testfile > > Postfix did not create that file as 'root'. You should use the same > user as when Postfix delivered the file.
User nobody isn't a normal user with a normal environment but I went ahead and temporarily assigned it a shell for testing: [root@c8vm ~]# su - nobody [nobody@c8vm /]$ touch /tmp/testfile [nobody@c8vm /]$ ls -l $_ -rw-rw-r-- 1 nobody nobody 0 Jun 16 16:33 /tmp/testfile [nobody@c8vm /]$ logout [root@c8vm ~]# su - jeremiah Last login: Wed Jun 16 16:34:32 PDT 2021 on pts/1 [jeremiah@c8vm ~]$ ls -l /tmp/testfile -rw-rw-r-- 1 nobody nobody 0 Jun 16 16:33 /tmp/testfile > Is the 'lost file' problem reproducible? Your pastebin had a large > time gap between delivery and looking with 'ls'. Yes, the time gap is a red herring. First the issue was noticed in production then I tested with this VM. On Wed, Jun 16, 2021 at 05:43:07PM -0600, Bob Proulx wrote: > Jeremiah Rothschild wrote: > > * OS: CentOS 8.4.2105 x64 (fully updated) > > I tested this on CentOS 7 and it worked okay for me. No problem. I > don't know anything about CentOS 8. Nod. I also tested this under CentOS 7 without issue. Thanks for confirming. > > [root@c8vm ~]# ls -l /tmp/somefile > > ls: cannot access '/tmp/somefile': No such file or directory > > Is your postfix running inside of a container with a different /tmp > than the one outside the container? No containers. > All appearances are that it is writing to /tmp/somefile and if it is > not there later then either it is getting removed or it is a different > /tmp. I also have the same problem when choosing a filesystem other than /tmp -- such as /home.