yostzach / s3fs

Automatically exported from code.google.com/p/s3fs
GNU General Public License v2.0
0 stars 0 forks source link

Input/output error when running ls #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is likely a duplicate of issue #47.

What steps will reproduce the problem?
1. /bin/mkdir /mnt/s3
2. /usr/local/bin/s3fs new.shrub.ca -o "url=https://s3.amazonaws.com" /mnt/s3
3. ls -l /mnt/s3

What is the expected output? 
Regular ls output.

What do you see instead?
root@green:/usr/local/bin# ls -l /mnt/s3
ls: cannot access /mnt/s3/boot: Input/output error
ls: cannot access /mnt/s3/data: Input/output error
ls: cannot access /mnt/s3/dev: Input/output error
ls: cannot access /mnt/s3/etc: Input/output error
ls: cannot access /mnt/s3/home: Input/output error

What version of the product are you using? On what operating system?
s3fs r177
Ubuntu 8.10 (kernel 2.6.27-11-generic)

Please provide any additional information below.
- My clock time is correct (I checked with ntpdate) -- time is in EDT
- I can see the files as expected with Transmit on my Mac
- Newly created files -- those created after mounting -- appear as expected.
- No errors are recorded in /var/log/messages
- If I try s3fs -f, the program appears to hang; normally it exits within one 
second

Original issue reported on code.google.com by paulschreiber on 13 Apr 2009 at 6:23

GoogleCodeExporter commented 9 years ago
This issue affects me as well (Ubuntu 9.10 on EC2).  Error only occurs if 
"url=https://s3.amazonaws.com" is used in fstab or on mount.

Original comment by seanca...@gmail.com on 13 Jul 2010 at 4:23

GoogleCodeExporter commented 9 years ago
Ok, looks like a patch for this bug has been made by f3rrix in issue 85:
http://code.google.com/p/s3fs/issues/detail?id=85

You can download his patch in that thread.  If you don't know how to patch 
s3fs, you can manually fix this problem by:

download s3fs

untar the file

edit s3fs.cpp

go to line 289

erase this line:
url_str = url_str.substr(0,7) + bucket + "." + url_str.substr(7,bucket_pos - 7) 
 + url_str.substr((bucket_pos + bucket_size));

add these lines:
int clipBy = 7;
if(!strncasecmp(url_str.c_str(), "https://", 8))
       {
               clipBy = 8;
       }
       url_str = url_str.substr(0,clipBy) + bucket + "." + url_str.substr(clipBy,bucket_pos - clipBy)  + url_str.substr((bucket_pos + bucket_size));

Save and exit the file.

make install

And presto!  Your S3 drive will now work when you mount it by https!

Major thanks to f3rrix for figuring this one out!

Original comment by seanca...@gmail.com on 13 Jul 2010 at 4:42

GoogleCodeExporter commented 9 years ago

Original comment by dmoore4...@gmail.com on 19 Oct 2010 at 1:47