2

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

AleMal
  • 1,977
  • 6
  • 24
  • 49
  • 1
    Try making the home directory a subdirectory that you create inside the mounted bucket. Unless something has changed, the mode of the mount point directory in s3fs is always fixed at 000 because of a quirk of how it handles directory permissions. Using chown/chmod against the mount point before mounting does not have the intended effect, and after mounting is not supported. Check this? – Michael - sqlbot Mar 02 '18 at 19:46
  • Please move your question to [su] or [sf] (delete here, re-post there). It's [off-topic here](//stackoverflow.com/help/on-topic). – Martin Prikryl Mar 03 '18 at 19:14

0 Answers0