Last active
September 20, 2022 06:30
-
-
Save bajpangosh/f3ed4a72ad4018848cc2377d2513c7bc to your computer and use it in GitHub Desktop.
Ubuntu and www:data permissions in amazon AWS EC2
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
Every time I have to go to terminal, ssh and do this to change the permissions between Joomla (www-data) and FileZilla (ubuntu) | |
sudo chown -R www-data.www-data /var/www/html (Joomla) | |
sudo chown -R ubuntu /var/www/html (File Zilla) | |
How do I set it so that I don't have to change this every time? | |
Solution | |
Add the ubuntu user to the www-data group | |
# sudo usermod -a -G www-data ubuntu | |
then | |
# sudo chmod g+w /var/www/html -R | |
(group writeable) all your files. | |
then | |
# sudo reboot | |
sudo groupadd www-data | |
sudo usermod -a -G www-data ec2-user | |
sudo chown root:www-data /var/www/html | |
sudo chmod -R 775 /var/www/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment