Domanda

I've been trying to set up Amazon S3 as a backup service for my files. I'd like to use the service by mounting it as a drive on my ubuntu install, and the s3fs project is supposed to make that possible. But I'm having some trouble with it. I believe I have successfully installed fuse and s3fs. When I mount a drive, I get no errors; however, when I then enter the directory and issue the 'ls' command, nothing happens. If I create a test file with a command like:

touch file.test

the file shows up in the aws console. But I am unable to either see the files that are already present in the bucket or navigate into subdirectories using the 'cd' command. I've done a bit of sniffing around in the projects google forum, and I think I have discovered that s3fs cannot see any contents of an s3 bucket unless those files or directories have been created using s3fs. Has anyone else encountered this problem? Is this really the way this project has been designed? Is this a bug? Or is there a way around this problem?

È stato utile?

Soluzione

S3FS uses special 'hidden' zero byte files to represent directories, because S3 doesn't really support directories. If you try a mkdir on your mounted s3fs bucket then use the AWS file browser you should see this in action. If your S3 bucket contains a directory structure that was not created by S3FS then S3FS won't recognise that structure. S3FS only works well with buckets that are only ever manipulated using S3FS.

After trying to use s3fs for a project I was working on I concluded that it was better to be exposed directly to the limitaions of S3, rather than using something which attempts to hide those limitations.

Altri suggerimenti

Not possible to access s3 with ls command:

ls: reading directory /mnt/s3/: Operation not permitted

Only with the s3cmd ls.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top