Debian Bug report logs - #793831
coreutils: stat does not report file birth timestamp, even when available

version graph

Package: coreutils; Maintainer for coreutils is Michael Stone <mstone@debian.org>; Source for coreutils is src:coreutils (PTS, buildd, popcon).

Reported by: Grant Sanders <gsdeb@fastmail.us>

Date: Mon, 27 Jul 2015 23:33:01 UTC

Severity: minor

Tags: fixed-upstream

Found in version coreutils/8.23-4

Forwarded to https://bugs.gnu.org/14703 https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=186896d65f6182dff15cad6c1045d22ad2004962

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, gsdeb@fastmail.us, Michael Stone <mstone@debian.org>:
Bug#793831; Package coreutils. (Mon, 27 Jul 2015 23:33:05 GMT) (full text, mbox, link).


Acknowledgement sent to Grant Sanders <gsdeb@fastmail.us>:
New Bug report received and forwarded. Copy sent to gsdeb@fastmail.us, Michael Stone <mstone@debian.org>. (Mon, 27 Jul 2015 23:33:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Grant Sanders <gsdeb@fastmail.us>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: coreutils: stat does not report file birth timestamp, even when available
Date: Mon, 27 Jul 2015 16:23:22 -0700
Package: coreutils
Version: 8.23-4
Severity: minor

Dear Maintainer,

Stat does not seem to recognize any timestamps for file birth, even when they
are available and accurate. My filesystem is ext4.

To reproduce, I ran: touch /root/test. Then I ran: stat /root/test. Output:

-------------------------------------------------------------------------------
  File: ‘/root/test’
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 802h/2050d      Inode: 13          Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2015-07-27 16:05:42.885356874 -0700
Modify: 2015-07-27 16:05:42.885356874 -0700
Change: 2015-07-27 16:05:42.885356874 -0700
 Birth: -
-------------------------------------------------------------------------------

Thereafter I ran: debugfs -R 'stat /root/test' /dev/sda2. Output below:

-------------------------------------------------------------------------------
debugfs 1.42.12 (29-Aug-2014)
Inode: 13   Type: regular    Mode:  0644   Flags: 0x80000
Generation: 840633321    Version: 0x00000000:00000001
User:     0   Group:     0   Size: 0
File ACL: 0    Directory ACL: 0
Links: 1   Blockcount: 0
Fragment:  Address: 0    Number: 0    Size: 0
 ctime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
 atime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
 mtime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
crtime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
Size of extra inode fields: 28
EXTENTS:
-------------------------------------------------------------------------------

The crtime (file birth) timestamp is is there and functioning normally. As far
as I know, this version of stat is supposed to have support for crtime on ext4.
I have not tested any other filesystem types yet.

As a side note, I know running as root is a bad idea, but debugfs complained
when I tried to use it with sudo.


-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages coreutils depends on:
ii  libacl1      2.2.52-2
ii  libattr1     1:2.4.47-2
ii  libc6        2.19-18
ii  libselinux1  2.3-2

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#793831; Package coreutils. (Tue, 28 Jul 2015 01:06:03 GMT) (full text, mbox, link).


Acknowledgement sent to Pádraig Brady <P@draigBrady.com>:
Extra info received and forwarded to list. Copy sent to Michael Stone <mstone@debian.org>. (Tue, 28 Jul 2015 01:06:03 GMT) (full text, mbox, link).


Message #10 received at submit@bugs.debian.org (full text, mbox, reply):

From: Pádraig Brady <P@draigBrady.com>
To: Grant Sanders <gsdeb@fastmail.us>, 793831@bugs.debian.org, Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#793831: coreutils: stat does not report file birth timestamp, even when available
Date: Tue, 28 Jul 2015 02:03:46 +0100
On 28/07/15 00:23, Grant Sanders wrote:
> Package: coreutils
> Version: 8.23-4
> Severity: minor
> 
> Dear Maintainer,
> 
> Stat does not seem to recognize any timestamps for file birth, even when they
> are available and accurate. My filesystem is ext4.
> 
> To reproduce, I ran: touch /root/test. Then I ran: stat /root/test. Output:
> 
> -------------------------------------------------------------------------------
>   File: ‘/root/test’
>   Size: 0               Blocks: 0          IO Block: 4096   regular empty file
> Device: 802h/2050d      Inode: 13          Links: 1
> Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
> Access: 2015-07-27 16:05:42.885356874 -0700
> Modify: 2015-07-27 16:05:42.885356874 -0700
> Change: 2015-07-27 16:05:42.885356874 -0700
>  Birth: -
> -------------------------------------------------------------------------------
> 
> Thereafter I ran: debugfs -R 'stat /root/test' /dev/sda2. Output below:
> 
> -------------------------------------------------------------------------------
> debugfs 1.42.12 (29-Aug-2014)
> Inode: 13   Type: regular    Mode:  0644   Flags: 0x80000
> Generation: 840633321    Version: 0x00000000:00000001
> User:     0   Group:     0   Size: 0
> File ACL: 0    Directory ACL: 0
> Links: 1   Blockcount: 0
> Fragment:  Address: 0    Number: 0    Size: 0
>  ctime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
>  atime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
>  mtime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
> crtime: 0x55b6b946:d315e528 -- Mon Jul 27 16:05:42 2015
> Size of extra inode fields: 28
> EXTENTS:
> -------------------------------------------------------------------------------
> 
> The crtime (file birth) timestamp is is there and functioning normally. As far
> as I know, this version of stat is supposed to have support for crtime on ext4.
> I have not tested any other filesystem types yet.
> 
> As a side note, I know running as root is a bad idea, but debugfs complained
> when I tried to use it with sudo.
> 
> 
> -- System Information:
> Debian Release: 8.1
>   APT prefers stable-updates
>   APT policy: (500, 'stable-updates'), (500, 'stable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> 
> Versions of packages coreutils depends on:
> ii  libacl1      2.2.52-2
> ii  libattr1     1:2.4.47-2
> ii  libc6        2.19-18
> ii  libselinux1  2.3-2
> 
> coreutils recommends no packages.
> 
> coreutils suggests no packages.

There currently is no Linux kernel interface to get creation time:
See upstream issue http://bugs.gnu.org/14703

thanks,
Pádraig.



Information forwarded to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#793831; Package coreutils. (Tue, 28 Jul 2015 01:18:03 GMT) (full text, mbox, link).


Acknowledgement sent to Pádraig Brady <P@draigBrady.com>:
Extra info received and forwarded to list. Copy sent to Michael Stone <mstone@debian.org>. (Tue, 28 Jul 2015 01:18:03 GMT) (full text, mbox, link).


Added tag(s) fixed-upstream. Request was from Paul Wise <pabs@debian.org> to control@bugs.debian.org. (Thu, 23 May 2019 01:09:07 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to 'https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=186896d65f6182dff15cad6c1045d22ad2004962'. Request was from Paul Wise <pabs@debian.org> to control@bugs.debian.org. (Thu, 23 May 2019 01:09:07 GMT) (full text, mbox, link).


Changed Bug forwarded-to-address to 'https://bugs.gnu.org/14703 https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=186896d65f6182dff15cad6c1045d22ad2004962' from 'https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=186896d65f6182dff15cad6c1045d22ad2004962'. Request was from Paul Wise <pabs@debian.org> to control@bugs.debian.org. (Thu, 23 May 2019 01:09:09 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Aug 8 01:35:47 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.