mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #1204] Permission denied when accessing bucket using php #639
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#639
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BattleMetalChris on GitHub (Nov 21, 2019).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1204
Additional Information
Version of s3fs being used (s3fs --version)
1.87
Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)
2.9.4
Kernel information (uname -r)
4.4.0-1044-aws
GNU/Linux Distribution, if applicable (cat /etc/os-release)
Ubuntu 16.04.3 LTS
s3fs command line used, if applicable
sudo s3fs pfceventmanager /home/ubuntu/s3fs_files/ -o nonempty -o umask=0000 -o uid=1000,gid=1000
Details about issue
I am running Ubuntu on an Amazon EC2 server.
I've mounted the bucket and everything mostly works.
However, I'm now trying to access the contents of the bucket via php and get permission denied.
I can view the file system in the bucket using a PuTTY session, with user ubuntu
I can view the file system when I connect via WinSCP. I can also use WinSCP to drop files into the mounted folder and they appear in the S3 dashboard. All good.
But when I try and access the mounted folder using php, I get permission denied.
I've tried putting the mounted folder in different places (in /home/, in /etc, even in /var/www) but it makes no difference.
I've tried mounting it using umask=0000
I've tried uid=1000,gid=1000 (1000 is ubuntu)
I've tried uid=33, gid=33 (33 is www-data)
@BattleMetalChris commented on GitHub (Nov 21, 2019):
Few more things:
I've tried performing the mount as both user ubuntu and as root, no difference.
However, if I reboot and let the fstab entry remount s3fs instead of using the command line, then it works fine, apache can see the mounted folder.
@BattleMetalChris commented on GitHub (Nov 21, 2019):
Fixed it!
I needed to use option -o allow_other