Reputation: 107
I have successfully mounts my bucket using s3fs, but I cannot see the objects (files in sub-directories) I created using the PHP library. If I add a file at the root level, I can see that. If I create a file at the root level, I can see that. If I create a directory, I can create items in it, but I cannot see the directories and objects I had previously created.
How can I see items created previously? I really want to create an EBS, mount it, and get this stuff off the S3. I was hoping mounting the S3 like this would make that easy.
Since I am just trying to move objects from S3 to EBS, I have been trying s3sync as well. No luck. When s3sync tried to create directories it created something weird...
---x-wx--T 1 root root 272 Oct 21 15:25 /photos/0
./s3sync.rb:638:in `initialize': No such file or directory - /photos/0.s3syncTemp (Errno::ENOENT)
HELP!!!
Thank for any help.
Thom
Upvotes: 1
Views: 4451
Reputation: 387
I have heard that if you use S3FS, then you need to do all the file transactions using that interface. Putting files into your bucket using PHP may add them correctly, but because they were not added using S3FS they may not be visible on your mounted drive.
I have a mounted S3FS system I use for web backups, and there are all these redundant folders and files that the backup script does not create, but get left over from other processes. None of those files are viewable using Transmit or another S3 access tool, only on the Amazon AWS console can you see the true contents of your bucket.
Looks like you have touched on another problem though with the ACL.
I would suggest doing a simmilar process but using S3FS to transfer the file over command line or s3Fox, see if it produces the same results.
Upvotes: 1
Reputation: 1458
It's because the subdirectories have no ACL assigned. I solved the problem by creating a subdirectory object with public-read permission/acl on S3.
e.g. $s3->putObjectString("", 'bucketName', 'directoryName/', S3::ACL_PUBLIC_READ);
Upvotes: 1