yangljun / s3fs

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

Null characters filled when overwriting a file on vsftpd. #402

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Detailed description of observed behavior:
I am using s3fs with vsftpd. Normally it is working well. Thanks for that.

The problem is that the content is filled by 'null' characters at the end of 
file when the file is overwritten. I think this is related with how the vsftpd 
and s3fs works with overwriting.

What steps will reproduce the problem - please be very specific and
detailed. (if the developers cannot reproduce the issue, then it is
unlikely a fix will be found)?

1. upload 80 bytes file with vsftpd on the directory mounted by s3fs.
2. change to file to 70 bytes
3. upload 70 bytes file with vsftpd on the same directory (overwriting).
4. the new uploaded file has 10 bytes 'null' characters at the end of file.

===================================================================
The following information is very important in order to help us to help
you.  Omission of the following details may delay your support request or
receive no attention at all.
===================================================================
Version of s3fs being used (s3fs --version):
1.74

Version of fuse being used (pkg-config --modversion fuse):
2.8.6

System information (uname -a):
Linux 3.2.0-36-virtual #57-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

Distro (cat /etc/issue):
Ubuntu 12.04.3 LTS 

s3fs command line used (if applicable):

/etc/fstab entry (if applicable):

s3fs#tttt /home/tttt fuse 
allow_other,_netdev,nosuid,uid=1001,gid=1001,url=https://s3.amazonaws.com 0 0

s3fs syslog messages (grep s3fs /var/log/syslog):
none

Original issue reported on code.google.com by zephy...@gmail.com on 19 Dec 2013 at 10:08

GoogleCodeExporter commented 9 years ago
FYI I had some issue with VSFTPD on that version of ubuntu and had to 
eventually dump it and go with proftp:

1.  Vsftpd – Doesn’t work well in this environment. First you can’t chroot 
a user to their home directory with the bundled version for Ubuntu 12.04 so I 
had to do a work around.
2.  Vsftpd – This turned out to be the cause of non root users not being able 
to write to a mounted s3fs directory. I dumped it, installed proftp and 
everything is working fine now.

Also as of today S3FS works great when you write a new file or delete the old 
one and write a new one but for me when i try to write over an existing file 
using php functions i get the same behavior as you do with the null filled area

Original comment by aa...@brackenclan.com on 4 Feb 2014 at 3:31