- Newest
- Most votes
- Most comments
Hello,
Greetings for the day!
Before moving forward, I would like to inform you that EFS does not require any special settings to be used with Apache or PHP and you can access it normally if it has required permissions.
Looking at the error, you can see it says “Permission denied” which means the user (who is running php script) does not have sufficient permissions to write into the target file "/var/www/html/test/"
Further, to be sure on this I tested it in my lab and I was able to write to that target file under EFS without any issues after adding the permissions. I have mounted an EFS file system on my test instance and replicate the same setup and I was getting the error for that user. After adding the required posix permission I was able to access the files.
I would suggest you to please verify the permissions and ownership of your efs folder and it’s subdirectories. Further I would also suggest you to identify the user which is associated with the PHP program when performing write operations to the destination folder "/var/www/html/test/".
Furthermore, for testing you can also try giving full permissions (777) to the target file “/var/www/html/test/“ and see if it resolves the issue. [+] https://docs.aws.amazon.com/efs/latest/ug/accessing-fs-nfs-permissions.html
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
It was a permissions issue. Thanks! However, I realized that permissons 777 would make it world writeable. I made it 755 and it worked. I don't know why I forget to check that. I guess because I am a newb.