{"id":664,"date":"2020-09-19T18:14:28","date_gmt":"2020-09-19T16:14:28","guid":{"rendered":"https:\/\/patrick-nagel.net\/blog\/?p=664"},"modified":"2020-09-19T18:14:28","modified_gmt":"2020-09-19T16:14:28","slug":"ubuntu-20-04-messes-up-file-modification-dates-on-exfat-file-systems","status":"publish","type":"post","link":"https:\/\/patrick-nagel.net\/blog\/archives\/664","title":{"rendered":"Ubuntu 20.04 messes up file modification dates on exfat file systems"},"content":{"rendered":"\n<p>Somehow related to <a href=\"https:\/\/patrick-nagel.net\/blog\/archives\/645\" data-type=\"URL\" data-id=\"https:\/\/patrick-nagel.net\/blog\/archives\/645\">my previous post<\/a>: As of currently &#8211; i.e. September 2020 &#8211; there is a <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/ubuntu-meta\/+bug\/1872504\" target=\"_blank\" rel=\"noreferrer noopener\">weird bug in Ubuntu 20.04&#8217;s exfat support<\/a>: When you mount an exfat file system (like the one on pretty much any MicroSD card that you would use in a GoPro), it will not only show all files as exactly one month into the future, but it will even <em>change<\/em> the modification date to that one month in the future. Thus, if you mount an exfat filesystem two times in a row, all files will have a modification date two months in the future. Very annoying.<\/p>\n\n\n\n<p>Luckily there is an easy workaround: Instead of the built-in (kernel module?) exfat support, just install the packages &#8216;exfat-fuse&#8217; and &#8216;exfat-utils&#8217; (i.e. type <code>sudo apt install exfat-fuse exfat-utils<\/code> in the shell). Once you mount the MicroSD card again, it will be mounted using the fuse driver, which does not mess up the modification dates.<\/p>\n\n\n\n<p>Those dates that have already been messed up though, need to be fixed. I&#8217;ve created <a rel=\"noreferrer noopener\" href=\"https:\/\/gitlab.com\/nagelp\/gopro-utils\/-\/blob\/ec91fbb9001de0a455a576b92a0ccf8173a0e08e\/correct_off-by-one_month.sh\" target=\"_blank\">a small script<\/a> that can do that. Download it (<a href=\"https:\/\/gitlab.com\/nagelp\/gopro-utils\/-\/raw\/master\/correct_off-by-one_month.sh?inline=false\">here<\/a>), <code>chmod +x<\/code> it and then run it with the file name(s) of the affected files as parameter(s). If the date has already been messed up to more than one month into the future, just run the script multiple times.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Somehow related to my previous post: As of currently &#8211; i.e. September 2020 &#8211; there is a weird bug in Ubuntu 20.04&#8217;s exfat support: When you mount an exfat file system (like the one on pretty much any MicroSD card that you would use in a GoPro), it will not only show all files as &hellip; <a href=\"https:\/\/patrick-nagel.net\/blog\/archives\/664\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Ubuntu 20.04 messes up file modification dates on exfat file systems&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-664","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/comments?post=664"}],"version-history":[{"count":2,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/664\/revisions"}],"predecessor-version":[{"id":666,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/664\/revisions\/666"}],"wp:attachment":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/media?parent=664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/categories?post=664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/tags?post=664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}