I'm learning web apps in amazon linux 2 + S3 environment
Can only ec2-user write to S3?
The problem is that the web application saves the data received by POST
Because the save user is "apache", it is "permission denied" and cannot be saved.
Directory structure of S3
/ data/WEBAPP01<== I want to save it here
/ data/WEBAPP02
Mount S3 with/mnt/S3
drwxr-xr-x 9 ec2-user ec2-user 245 Nov 28 08:34 ec2-user
lrwxrwxrwx 1 root root 14 Nov 28 13:15 share->/mnt/S3/data/
/home/share/=>/mnt/S3/data/is symbolized.
The web application can receive files received via POST
/home/share/WEBAPP01/hogehoge.dat
Attempting to save to will result in "permission denied".
chmod 777/mnt/S3/data/WEBAPP01
I want to do it, but EC2 can't do that ...
Are you just starting out with AWS?
-
Answer # 1
-
Answer # 2
/home/ec2-user/go/bin/goofys # s3_test/mnt/S3 fuse _netdev, allow_other,-file-mode = 0777,- -dir-mode = 0777,-uid = 1000,-gid = 1000 0 0
By adding the declaration --dir-mode = 0777, other users (processes) can now write.
Related articles
- amazon ec2 - permission denied (publickey) is displayed when trying to transfer files to ec2 with scp
- amazon ec2 - permission denied (publickey) when deploying capistrano automatically
- amazon ec2 - i want to resolve permission denied when using the scp command
- amazon ec2 - ec2 stops without permission
- amazon s3 - i want to upload an image to s3 of aws, but permission denied 403 appears
- i want to be able to use files with permission denied on ubuntu normally
- amazon ec2 - aws ec2 file download does not work ssh connection command scp wordpress
- amazon ec2 - what is the no instance type for ec2 billing?
- python - permission denied cannot be resolved
- linux - permission denied (publickey) appears in ssh connection, and i cannot connect to ec2
- amazon ec2 - about "send the created csr to a certification authority (ca)"/tutorial: setting up ssl/tls on amazon lin
- amazon ec2 - creating an ec2 instance with docker toolbox
- amazon ec2 - sudo yum install does not pass
- amazon ec2 - adding a show method in laravel will break other methods
- amazon ec2 - i want to make an ssh connection to an ec2 instance (rlogin)
- amazon ec2 - stopping and starting an aws instance does not display custom metrics
- amazon ec2 - setting the site with ssl on aws, https on https setting of road lapanther and target group does not work
- amazon ec2 - maximum number of files stored in linux (rhel, centos, amazon linux 2) directory
- macos (osx) - permission denied with osexecv
- nginx - [aws] i want cloudwatch to transfer the web-server access log
- php - 404 not found appears when posting an image in the production environment of the laravel application
- ruby on rails - s3 images are not saved on the ec2 server
- ruby on rails - cannot reset the production db
- java - [spring] the generated csv cannot be placed in ec2
- ruby on rails - undefined method `[]' for nil:nilclass in rake assets:precompile after deploy is executed
- amazon ec2 - when deploying vuejs on aws, is it s3 or ec2?
- ruby - [aws/s3] an "uninitialized constant fog" error occurs while setting the local image save
- amazon ec2 - [aws] cannot connect to the private subnet
- amazon ec2 - cannot display tomcat in browser
A little information is missing ...
Isn't the Apache user authorized to write to/mnt/S3/data/
?The first question is
How is S3 mounted first (via Storage Gateway?)
Why bother to save to the mounted S3 via local
There isI think it should be uploaded directly to S3 ...
The mount of S3 does not mount the storage directly in any way, but I think that it will only be synchronized via something, so there seems to be many cases that do not work as expected I will.
, but I don't understand what I can do here.