[GH-ISSUE #1872] S3fs Mounted folder show invalidate timestamp as "1969-12-31 23:59:59" #954

Closed
opened 2026-03-04 01:50:11 +03:00 by kerem · 3 comments
Owner

Originally created by @tomato0401 on GitHub (Jan 25, 2022).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1872

s3fs version: v1.90
s3 backend: minio-RELEASE.2019-10-12T01-39-57Z

I use a minio instance for s3 storage, when i mount it to local use s3fs command, some folder shows invalid timestamp. That cause my python code could not import libs from those folders.

drwxrwx--- 1 user user    0 1969-12-31 23:59:59.000000000 +0000 configs

I found that in this file "https://github.com/s3fs-fuse/s3fs-fuse/blob/v1.90/src/metaheader.cpp" get_time get_ctime get_mtime return -1 while "x-amz-meta-xxxx" is not provided.

Why should these method return -1 but not 0, some where -1 is consided as wrong time and cause many unnormal action.

Originally created by @tomato0401 on GitHub (Jan 25, 2022). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1872 s3fs version: v1.90 s3 backend: minio-RELEASE.2019-10-12T01-39-57Z I use a minio instance for s3 storage, when i mount it to local use s3fs command, some folder shows invalid timestamp. That cause my python code could not import libs from those folders. ``` drwxrwx--- 1 user user 0 1969-12-31 23:59:59.000000000 +0000 configs ``` I found that in this file "https://github.com/s3fs-fuse/s3fs-fuse/blob/v1.90/src/metaheader.cpp" get_time get_ctime get_mtime return -1 while "x-amz-meta-xxxx" is not provided. Why should these method return -1 but not 0, some where -1 is consided as wrong time and cause many unnormal action.
kerem closed this issue 2026-03-04 01:50:11 +03:00
Author
Owner

@gaul commented on GitHub (Jan 25, 2022):

This seems like an issue where -1 should indicate the absence of a timestamp on the object but should reflect as 0 to the application. This should be an easy fix to s3fs_getattr; would you like to try fixing this? Also add a test to test_read_external_object for the metadata.

<!-- gh-comment-id:1021140623 --> @gaul commented on GitHub (Jan 25, 2022): This seems like an issue where -1 should indicate the absence of a timestamp on the object but should reflect as 0 to the application. This should be an easy fix to `s3fs_getattr`; would you like to try fixing this? Also add a test to `test_read_external_object` for the metadata.
Author
Owner

@ggtakec commented on GitHub (Jan 29, 2022):

There was a problem with the processing(this issue), and I posted new PR(#1877) to fix this.

Note:
These functions return -1, which reason is used in the internal processing to determine whether or not the object does not have a headers(x-meta-***).
In that PR fix, it set 0 when getting -1 in function which does not require judgment.

If the PR is merged without any problem, I would be grateful if you could confirm it.

<!-- gh-comment-id:1024822489 --> @ggtakec commented on GitHub (Jan 29, 2022): There was a problem with the processing(this issue), and I posted new PR(#1877) to fix this. Note: These functions return `-1`, which reason is used in the internal processing to determine whether or not the object does not have a headers(x-meta-***). In that PR fix, it set `0` when getting `-1` in function which does not require judgment. If the PR is merged without any problem, I would be grateful if you could confirm it.
Author
Owner

@gaul commented on GitHub (Sep 8, 2023):

Closing as fixed. Please reopen if you can reproduce these symptoms with 1.93.

<!-- gh-comment-id:1710957404 --> @gaul commented on GitHub (Sep 8, 2023): Closing as fixed. Please reopen if you can reproduce these symptoms with 1.93.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#954
No description provided.