in my project i have to run an Linux EC2 instance like an FTP server connected to my S3 bucket directly. After installing s3fs+fuse, vsftpd and all dependencies, configuring the conf files correctly, i do this:
First i create my folder fo ftp home:
$ mkdir -p s3dir
then change permission
$ sudo chmod 777 s3dir
Create an user for manage ftp home access:
sudo adduser test3
Assign readwrite permission to folder
$ sudo chown tests3:tests3 s3dir
now if i check:
$ sudo ls -la s3dir
total 8
drwxrwxrwx 2 tests3 tests3 4096 Mar 2 13:11 .
drwx------ 10 ec2-user ec2-user 4096 Mar 2 13:11 ..
all done Now with s3fs connect my folder endpoint to my S3 bucket like this:
s3fs mytestbucket s3dir -o passwd_file=~/.passwd-s3fs
at this point if i create a file in s3dir folder i see this on my S3, correctly. Now is time to connect user to folder for vsftpd:
$ sudo usermod -d /home/ec2-user/s3test tests3
$ sudo service vsftpd restart
$ setenforce 0
everything would seem to be ok but when i can try to connect to my ftp server using test3 user and password error 500 OOPS: cannot change directory:/home/ec2-user/s3test appears
someone know where is the problem?
Thanks in advance