Skip to content

Commit

Permalink
Replace syntax of chown from '.' to ':' for Dockerfiles C10S and RHEL10
Browse files Browse the repository at this point in the history
----
Some older scripts may still use '.' in place of the ':' separator. POSIX 1003.1-2001
(see [Standards conformance](http://www.gnu.org/software/coreutils/manual/html_node/Standards-conformance.html))
does not require support for that, but for backward compatibility GNU chown supports '.' so long as no ambiguity results.
New scripts should avoid the use of '.' because it is not portable,
and because it has undesirable results if the entire owner'.'group happens to identify a user whose name contains '.'.
----

Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Jan 16, 2025
1 parent 84fce4a commit 5c55819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 10.11/Dockerfile.c10s
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff
rpm -V $INSTALL_PKGS && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION" && \
dnf -y clean all --enablerepo='*' && \
mkdir -p /var/lib/mysql/data && chown -R mysql.0 /var/lib/mysql && \
mkdir -p /var/lib/mysql/data && chown -R mysql:0 /var/lib/mysql && \
test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)"

# Get prefix path and path to scripts rather than hard-code them in scripts
Expand Down
2 changes: 1 addition & 1 deletion 10.11/Dockerfile.rhel10
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN INSTALL_PKGS="policycoreutils rsync tar xz gettext hostname bind-utils groff
rpm -V $INSTALL_PKGS && \
/usr/libexec/mysqld -V | grep -qe "$MYSQL_VERSION\." && echo "Found VERSION $MYSQL_VERSION" && \
dnf -y clean all --enablerepo='*' && \
mkdir -p /var/lib/mysql/data && chown -R mysql.0 /var/lib/mysql && \
mkdir -p /var/lib/mysql/data && chown -R mysql:0 /var/lib/mysql && \
test "$(id mysql)" = "uid=27(mysql) gid=27(mysql) groups=27(mysql)"

# Get prefix path and path to scripts rather than hard-code them in scripts
Expand Down

0 comments on commit 5c55819

Please sign in to comment.