Skip to content

Instantly share code, notes, and snippets.

@bachvtuan
Last active July 31, 2020 02:14
Show Gist options
  • Save bachvtuan/89a9e5861abd927ad355687d465671a1 to your computer and use it in GitHub Desktop.
Save bachvtuan/89a9e5861abd927ad355687d465671a1 to your computer and use it in GitHub Desktop.
Permission for normal user access on nginx upload folder
# 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