Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bucket下根目录的创建时间是1970.1.1 #12

Closed
zxkane opened this issue Feb 15, 2016 · 9 comments
Closed

bucket下根目录的创建时间是1970.1.1 #12

zxkane opened this issue Feb 15, 2016 · 9 comments

Comments

@zxkane
Copy link

zxkane commented Feb 15, 2016

➜ ~ ossfs vme-static /tmp/ossfs-test -ourl=https://oss-cn-beijing-internal.aliyuncs.com -omp_umask=027 -ouid=1000 -ogid=1005
➜ ~ ll /tmp/ossfs-test
total 512
drw-rw-rw- 1 zxkane vme 0 Jan 1 1970 static

这个目录应该是创建文件/static/folder/a.txt时被创建出来的。

@hryang
Copy link
Contributor

hryang commented Feb 16, 2016

您好,static这个目录是如何被创建的?我在控制台网页上新建了一个目录,在ossfs中ll看到,时间是属性是正确的,重现不了您的问题。

@zxkane
Copy link
Author

zxkane commented Feb 16, 2016

时间太久了,具体如何创建的记不清了。

应该是通过SDK上传对象时创建的。比如/static/js/1.js

Aliyun cli有什么命令可以列出这个object的properties吗?

@hryang
Copy link
Contributor

hryang commented Feb 17, 2016

@ghost
Copy link

ghost commented Feb 18, 2016

我这边也有同样的问题:

[root@iZ22a5tl53vZ ~]# cd test
[root@iZ22a5tl53vZ test]# ls -l
total 0
[root@iZ22a5tl53vZ test]# mkdir ossdir
[root@iZ22a5tl53vZ test]# ossfs ken-oss-sg-1 ossdir -ourl=http://oss-ap-southeast-1-internal.aliyuncs.com -o allow_other
[root@iZ22a5tl53vZ test]# ls -l
total 1
drwxrwxrwx 1 root root 0 Jan 1 1970 ossdir

@hryang
Copy link
Contributor

hryang commented Feb 18, 2016

@ldkhang 您的问题和上面不一样,挂载点(即您的ossdir)的时间显示的确是1970,这是by design的。

上面的问题是在挂载目录内的子目录或者文件显示1970,按道理是不应该出现1970的,而是文件创建的时间。

@ghost
Copy link

ghost commented Feb 18, 2016

明白了,但是为什么 by design 是1970呢?

@hryang
Copy link
Contributor

hryang commented Feb 18, 2016

逻辑上,一般是先有目录,再有目录内的文件。所以时间上,一般应该是目录内的文件晚于目录本身。但是在挂载的场景下,这些文件可能是其他地方创建的,如果以当前时间作为挂载点的时间,可能会导致目录比目录内的内容还新,有点奇怪,所以就选了一个最小的时间,1970.1.1。

@hryang
Copy link
Contributor

hryang commented Feb 20, 2016

@zxkane 如果不能重现,这个issue我先关了,有问题再reopen。

@hryang hryang closed this as completed Feb 20, 2016
@rockuw
Copy link
Contributor

rockuw commented Feb 29, 2016

@zxkane static的时间是1970是因为OSS中并没有'static/'这个对象,而只有'static/folder/a.txt'这个对象。OSS中的目录是模拟出来的,详见:https://help.aliyun.com/document_detail/oss/user_guide/manage_object/list_object.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants