Last active
July 31, 2020 02:14
-
-
Save bachvtuan/89a9e5861abd927ad355687d465671a1 to your computer and use it in GitHub Desktop.
Permission for normal user access on nginx upload folder
This file contains hidden or 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
# Create group name normaluser-web | |
sudo groupadd normaluser-web | |
# Add normal user to group | |
usermod -a -G normaluser-web normaluser | |
# Add www-data to group | |
usermod -a -G normaluser-web www-data | |
# Set ownship folder to user with new group | |
chown -R normaluser:normaluser-web upload/ | |
# Set 775 to www-data can write too. | |
chmod 775 upload/ | |
# https://perishablepress.com/upload-large-files/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment