Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I already installed s3fs, created folder for mounting in /mnt/s3 then I created a file in /etc/passwd-s3fs within content BucketName:AccessKeyId:SecretAccessKey but I still can't access it, and the error is:

s3fs: could not determine how to establish security credentials

am I missed something?

Thanks

share|improve this question
    
Looking at the code, if it cannot parse the credential file in its default location, it silently falls through to that error. But, if you put that same file's path into the environment variable AWS_CREDENTIAL_FILE or pass on the command line, it will report "is not readable" if it fails to parse. –  Tim B Jul 12 '13 at 17:01
    
Hi Tim, Could you please give me more explanation ? –  Khalid Jul 13 '13 at 10:11
    
and now the error is "s3fs: specified passwd_file is not readable", do you know what is that mean ? –  Khalid Jul 13 '13 at 13:51
    
The code opens a stream to read the file. Before it passes the stream to the method that reads the content, it checks for errors on the stream. My guess is that the user trying to mount doesn't have permission to read the file. Try running "chmod 666 /etc/passwd-s3fs" to make it world readable to debug. Then be sure to set ownership and permissions to something more reasonable from a security perspective. (anyone reading your credentials from that file can then use your AWS S3 account) –  Tim B Jul 14 '13 at 3:23

1 Answer 1

Looking at the code, it opens a stream to read the file. Before it passes that stream to the method that reads the content, it checks for errors on the stream. My guess is that the user trying to mount doesn't have permission to read the file.

The right way to fix this is to give that config file the proper ownership and permissions if you can determine what it should be. If you cannot, you can open up the permissions to make it readable by everyone as a test.

Try running "chmod 666 /etc/passwd-s3fs" to make it world readable and see if that allows you to mount. Note that some programs (such as Openssh) are written to warn or fail if config files have permissions that are not restrictive enough. I only looked quickly, but didn't see that in S3fs. Once you confirm the config file is correct, you must then set ownership and permissions to something more reasonable from a security perspective. (anyone reading your credentials from that file can then use your AWS S3 account)

share|improve this answer
    
yes you right, and thanks to you now I can mount my folder, but another problem, after pass your instructions above and I list my mount folder, that exist, and the result is : (s3fs@fuse0 on /mnt/s3 (fuse4x, synchronous) ), but when i wish to list /mnt/s3, the result (ls: /mnt/s3: No such file or directory), so any idea with this ? –  Khalid Jul 15 '13 at 12:00
    
it is because mounting point previllage on fstab ? but I can't figure to change fstb on lion, I alredy tried use (sudo vifs) but it does'nt change anyting. i don;t know –  Khalid Jul 15 '13 at 14:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.