AWS Security ChangesHomeSearch

AWS AWSEC2: Fix cloud-init examples: package_upgrade and quoted chmod arguments

Service: AWSEC2 · 2026-11-10 · Documentation medium

File: AWSEC2/latest/UserGuide/user-data.md · Type: authz

Summary

Changes package_upgrade from 'all' to 'true' and quotes the chmod arguments (including the escaped semicolon) in the /var/www directory and file permission examples for both AL2023 and AL2 user-data snippets.

Security assessment

The quoted/escaped command form corrects example user-data that could previously fail to execute, meaning the intended directory (2775) and file (0664) permissions on /var/www might not have been applied by users copying the snippet. It is a correctness fix to permission-setting examples rather than a documented vulnerability or CVE.

Evidence

+    - [ find, /var/www, -type, d, -exec, chmod, "2775", "{}", ";" ]

Diff

diff --git a/AWSEC2/latest/UserGuide/user-data.md b/AWSEC2/latest/UserGuide/user-data.md
index 8c9411e..1a22f2e 100644
--- a//AWSEC2/latest/UserGuide/user-data.md
+++ b//AWSEC2/latest/UserGuide/user-data.md
@@ -199 +199 @@ AL2023
-    package_upgrade: all
+    package_upgrade: true
@@ -213,2 +213,2 @@ AL2023
-    - [ find, /var/www, -type, d, -exec, chmod, 2775, {}, \; ]
-    - [ find, /var/www, -type, f, -exec, chmod, 0664, {}, \; ]
+    - [ find, /var/www, -type, d, -exec, chmod, "2775", "{}", ";" ]
+    - [ find, /var/www, -type, f, -exec, chmod, "0664", "{}", ";" ]
@@ -222 +222 @@ AL2
-    package_upgrade: all
+    package_upgrade: true
@@ -235,2 +235,2 @@ AL2
-    - [ find, /var/www, -type, d, -exec, chmod, 2775, {}, \; ]
-    - [ find, /var/www, -type, f, -exec, chmod, 0664, {}, \; ]
+    - [ find, /var/www, -type, d, -exec, chmod, "2775", "{}", ";" ]
+    - [ find, /var/www, -type, f, -exec, chmod, "0664", "{}", ";" ]