Michał Kowol Tech Blog

How to server cifi shared folder using nginx.

Setup Create folder /media/storage/dir/ mkdir -p /media/storage/dir/ Next, mount shared directory. uid and gid are very important because without this you will get 403 Forbidden. sudo mount -t cifs -o uid=www-data,gid=www-data,ro,username=username,password=password // /media/storage/dir/ -t cifs - type of fs (cifs - Common Internet File System, also known as smb) uid - specific user gid - specific groutp ro - read-only rw - read-write username - shared directory username password - shared directory password Modify nginx config (/etc/nginx/sites-available/somefile)