Created
June 29, 2020 15:19
-
-
Save michaelbonner/644926d460cb89bd3000ad4999fd987e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Legend: | |
## {USER_NAME} replace with the user you log in to the system as | |
## {APPLICATION_DIRECTORY} : replace with the project directory name | |
# Installing bindfs (just the first time) | |
$ sudo apt-get update | |
$ sudo apt-get -y install bindfs | |
# Creating the application mount point | |
$ mkdir -p /home/{USER_NAME}/sites/{APPLICATION_DIRECTORY} | |
$ chown -Rf {USER_NAME}:{USER_NAME} /home/{USER_NAME}/sites | |
$ chmod -Rf 770 /home/{USER_NAME}/sites | |
$ sudo vim /etc/fstab | |
# Add the following on a new line | |
bindfs#/var/www/{APPLICATION_DIRECTORY} /home/{USER_NAME}/sites/{APPLICATION_DIRECTORY} fuse force-user={USER_NAME},force-group={USER_NAME},create-for-user=www-data,create-for-group=www-data,create-with-perms=0770,chgrp-ignore,chown-ignore,chmod-ignore 0 0 | |
$ sudo mount /home/{USER_NAME}/sites/{APPLICATION_DIRECTORY} | |
# source: http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment