-
Notifications
You must be signed in to change notification settings - Fork 330
Open
Description
Logic issues with the following
https://github.com/sclorg/s2i-php-container/blob/master/8.1/s2i/bin/run#L59-L68
if [ "x$PLATFORM" == "xel9" ] || [ "x$PLATFORM" == "xfedora" ]; then
if [ -n "${PHP_FPM_RUN_DIR:-}" ]; then
/bin/ln -s /dev/stderr ${PHP_FPM_LOG_PATH}/error.log
mkdir -p ${PHP_FPM_RUN_DIR}
chmod -R a+rwx ${PHP_FPM_RUN_DIR}
chown -R 1001:0 ${PHP_FPM_RUN_DIR}
mkdir -p ${PHP_FPM_LOG_PATH}
chmod -R a+rwx ${PHP_FPM_LOG_PATH}
chown -R 1001:0 ${PHP_FPM_LOG_PATH}
fi
fiOn runtime it's trying to create folders and set permissions in an immutable object, shouldn't this be in the assemble script and not at runtime?
Also there's functional issues such as trying to symlink to the error.log before the mkdir runs on the ${PHP_FPM_LOG_PATH} but the bigger issue is this won't run inside the assembled container as the following output indicates running as non root.
chmod: changing permissions of '/run/php-fpm': Operation not permitted
chown: changing ownership of '/run/php-fpm': Operation not permitted
chmod: changing permissions of '/var/log/php-fpm': Operation not permitted
chown: changing ownership of '/var/log/php-fpm/error.log': Operation not permitted
chown: changing ownership of '/var/log/php-fpm': Operation not permittedBellxlLi and roemba