Block blob files do not get displayed on web site

Reserved virtual machine 46 Reputation points
2019-12-02T16:38:46.867+00:00

Hi,

I just spent the whole night and day connecting the blob storage (block blob premium and standard) using blobfuse to my virtual machine (webserver) running on CentOS (Azure). I am using Centos/Plesk (BYOL) image.

I am pretty sure I did everything right, the user account (owner of the website dir) and other users such as apache, nginx can see the files. Permission to the mapped directory are 777 (set using "-o allow_other" option when mounting), I can normally cd / view / run / write to any file (blob) in the storage using the mounted directory on my virtual machine (using any user).

But my web site does not load those pictures/documents.

I can see that the files are being "touched" somehow by the web site, there are traces of what's happening there. If I list the directory using ls command, the files appear as owned by the user who listed the content of the directory (I know blobs do not have dirs but this blobfuse somehow make those file look like they are in a normal files). So if I mount the storage, load the web and then list the directory using another user then a web user, I am able to see which files have been attempted to open by the web (because they have a different "owner") but the files apparently were never opened (just somehow listed their name etc.. but never opened), because there is never created a copy of them in the local cache.

Please help. Am I missing something? The blobs are not to be handled the same as the regular files (except missing file level permission) when mapped using blobfuse? I even tried with the expensive premium block blob storage, with extremely low access times to see if there will be any difference, but nothing changed.

Could there be any special setting in php/apache/nginx config to allow working with files on the blob storage?

I have followed below practice:

https://learn.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux
https://github.com/Azure/azure-storage-fuse

Thank you!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,083 questions
{count} votes

2 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 18,352 Reputation points Microsoft Employee
    2019-12-09T18:11:46.447+00:00

    Kindly post the question on MSDN Azure Storage forum.
    Azure Storage service is yet to be migrated to Q&A.

    We are actively working to onboard all services. We will make a public announcement once complete. Thank you for your patience as we evolve the Q&A platform.

    0 comments No comments

  2. blaize stewart 1 Reputation point MVP
    2020-03-12T00:09:23.763+00:00

    You have to use a blobfuse mount under the user that the process runs under for it to work with. Add the command to your rc.local file and mount it there.

    sudo -u www-data blobfuse /usr/share/nginx/nextcloud/data --tmp-path=/tmp -o uid=33 -o gid=33 -o attr_timeout=240 -o entry_timeout=240 -o negative_timeout=120 --config-file=/blobfuse/blob.cfg --log-level=LOG_DEBUG --file-cache-timeout-in-seconds=120

    make sure that the uid and gid match the user in the -u parameter too.

    Hope that helps.

    0 comments No comments