[GH-ISSUE #1379] using allow_other but still get permission denied #736

Closed
opened 2026-03-04 01:48:19 +03:00 by kerem · 2 comments
Owner

Originally created by @troke12 on GitHub (Aug 28, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1379

Version of s3fs being used (s3fs --version)

v1.82

Kernel information (uname -r)

4.15.0-112-generic

GNU/Linux Distribution, if applicable (cat /etc/os-release)

NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Details about issue

I was mounting my Google Cloud Storage bucket with option allow_other, and integrate the bucket with my website and using NGINX. But it's still got permission denied

ERROR LOG in NGINX
2020/08/28 08:47:10 [error] 15123#15123: *4 open() "/root/storage/favicon.ico" failed (13: Permission denied), client: 1.1.1.1, server: storage.mydomain, request: "GET /favicon.ico HTTP/1. 1", host: "storage.mydomain.com", referrer: "https://storage.mydomain.com/index.html"

Nginx configuration

#storage
server {
    listen 80;
    listen [::]:80;
    server_name storage.mydomain.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name storage.mydomain.com;

    root /root/storage;
    index index.php index.html;

    #Certificate pathes
    ssl_certificate /root/.acme.sh/mydomain.com/fullchain.cer;
    ssl_certificate_key /root/.acme.sh/datenshi.xyz/mydomain.com.key;
    ssl_trusted_certificate /root/.acme.sh/mydomain.com/ca.cer;

    ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers on;

    #Headers
    add_header Access-Control-Allow-Origin *;
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload;" always;
    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Robots-Tag none;

        location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include /etc/nginx/fastcgi_params;
    }
	location / {
        #autoindex on;
        index index.php;
        rewrite ^/(u|d)/[0-9]+$ /rewrite.php;
    }


        location /api/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Host hentai.ninja;
        proxy_redirect off;
        proxy_pass http://1.1.1.1;
    }

        location /d/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded_for $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_redirect off;
        proxy_pass http://0.0.0.0:32767;
    }
}
Originally created by @troke12 on GitHub (Aug 28, 2020). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1379 #### Version of s3fs being used (s3fs --version) v1.82 #### Kernel information (uname -r) 4.15.0-112-generic #### GNU/Linux Distribution, if applicable (cat /etc/os-release) ``` NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic ``` ### Details about issue I was mounting my Google Cloud Storage bucket with option **allow_other**, and integrate the bucket with my website and using NGINX. But it's still got permission denied **ERROR LOG in NGINX** `2020/08/28 08:47:10 [error] 15123#15123: *4 open() "/root/storage/favicon.ico" failed (13: Permission denied), client: 1.1.1.1, server: storage.mydomain, request: "GET /favicon.ico HTTP/1. 1", host: "storage.mydomain.com", referrer: "https://storage.mydomain.com/index.html"` **Nginx configuration** ``` #storage server { listen 80; listen [::]:80; server_name storage.mydomain.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl; listen [::]:443 ssl; server_name storage.mydomain.com; root /root/storage; index index.php index.html; #Certificate pathes ssl_certificate /root/.acme.sh/mydomain.com/fullchain.cer; ssl_certificate_key /root/.acme.sh/datenshi.xyz/mydomain.com.key; ssl_trusted_certificate /root/.acme.sh/mydomain.com/ca.cer; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; ssl_protocols TLSv1.2; ssl_prefer_server_ciphers on; #Headers add_header Access-Control-Allow-Origin *; add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload;" always; add_header X-Content-Type-Options nosniff; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Robots-Tag none; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location / { #autoindex on; index index.php; rewrite ^/(u|d)/[0-9]+$ /rewrite.php; } location /api/ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host hentai.ninja; proxy_redirect off; proxy_pass http://1.1.1.1; } location /d/ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded_for $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_redirect off; proxy_pass http://0.0.0.0:32767; } } ```
kerem 2026-03-04 01:48:19 +03:00
  • closed this issue
  • added the
    need info
    label
Author
Owner

@gaul commented on GitHub (Oct 10, 2020):

Could you test with the latest version 1.87? It has multiple permission fixes.

<!-- gh-comment-id:706523486 --> @gaul commented on GitHub (Oct 10, 2020): Could you test with the latest version 1.87? It has multiple permission fixes.
Author
Owner

@gaul commented on GitHub (Nov 15, 2020):

Please reopen if symptoms persist.

<!-- gh-comment-id:727561819 --> @gaul commented on GitHub (Nov 15, 2020): Please reopen if symptoms persist.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#736
No description provided.