Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-23-2013, 07:58 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 4

Rep: Reputation: Disabled
Question ext4 FS / relatime / different treatment on access time after permission changes

Hi all,

I've stumbled on something I can't explain and I would greatly appreciate if someone can help me to understand.

I did tests on an ext4 filesystem with relatime activated. I understood this allow to only update the access time (atime) of a file once after a write (mtime) or a status modification (ctime) occured.

A write action leads to all time attributes to be updated
A status modification updates only the ctime
A read updates only the atime, if it's the first reading after a write or a status modification.

Now here is my problem: on that very same filesystem I did the same test on a mail file (html / eml type), and this one gets its access time updated after both a write action AND a status modification. Also the system does it so that its time access is slightly higher that the write or status time, so it never gets updated on a reading.

I can see how this could be a good thing, but I just don't understand why two files on the same filesystem get a different treatment.

Please help my poor tourmented soul
Old 04-27-2013, 02:39 AM   #2
Andy Alt
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware32-stable, Debian32 stable, LFS 7.1
Posts: 385

Rep: Reputation: 44
I'm not sure if this applies but... (from the mount man page)

Update inode access times relative to modify or change time.
Access time is only updated if the previous access time was ear‐
lier than the current modify or change time. (Similar to noat‐
ime, but doesn't break mutt or other applications that need to
know if a file has been read since the last time it was modi‐

Since Linux 2.6.30, the kernel defaults to the behavior provided
by this option (unless noatime was specified), and the stricta‐
time option is required to obtain traditional semantics. In
addition, since Linux 2.6.30, the file's last access time is
always updated if it is more than 1 day old.
Old 04-27-2013, 05:18 AM   #3
LQ Newbie
Registered: Jun 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you, it brings more precisions about the normal behaviour of the kernel on a fs mounted with relatime.
However I still don't understand why I get a different time managment behaviour on files last accessed the same day on the same filesystem.
I will do some more tests, try to play with the *time options on mounting. I'll post the results afterwads.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] root partition mounted:/dev/root on / type ext4 (rw,relatime,barrier=1,data=ordered) costasdk Slackware 2 06-30-2011 03:09 PM
i have given chmod 777 permission for access now how to revert that permission mohdsuboor23 Linux - Server 1 12-11-2010 06:19 AM
[SOLVED] Write permission to every user in ext4 (fstab) the98 Linux - General 10 09-14-2010 10:23 AM
How to get file creation time (Ext4, ntfs-3g)? isync Linux - Software 10 06-19-2010 06:49 PM
Need ACCESS to change files! Every time I try to change a setting,"Permission Denied" Balarabay1 SUSE / openSUSE 2 03-06-2006 10:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration