Add user to group - change group ownership

 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html

  1. Add your user (in this case, ec2-user) to the apache group.

    [ec2-user ~]$ sudo usermod -a -G apache ec2-user
  2. Log out and then log back in again to pick up the new group, and then verify your membership.

    1. Log out (use the exit command or close the terminal window):

      [ec2-user ~]$ exit
    2. To verify your membership in the apache group, reconnect to your instance, and then run the following command:

      [ec2-user ~]$ groups ec2-user adm wheel apache systemd-journal
  3. Change the group ownership of /var/www and its contents to the apache group.

    [ec2-user ~]$ sudo chown -R ec2-user:apache /var/www
  4. To add group write permissions and to set the group ID on future subdirectories, change the directory permissions of /var/www and its subdirectories.

    [ec2-user ~]$ sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \;
  5. To add group write permissions, recursively change the file permissions of /var/www and its subdirectories:

    [ec2-user ~]$ find /var/www -type f -exec sudo chmod 0664 {} \;

Now, ec2-user (and any future members of the apache group) can add, delete, and edit files in the Apache document root, enabling you to add content, such as a static website or a PHP application.

Không có nhận xét nào:

Is it okay to use both fetchpriority="high" and loading="eager" in img tag?

 https://stackoverflow.com/questions/77744344/is-it-okay-to-use-both-fetchpriority-high-and-loading-eager-in-img-tag Yes Fetchpriority and l...