Give the proper file/directory permissions to the pgAdmin installation directory on RHEL-8. This is the only platform that has write permission for the executable files after installation which is fixed.

This commit is contained in:
Khushboo Vashi 2024-06-24 17:09:28 +05:30
parent 3d107ea618
commit 4a645343a9
3 changed files with 8 additions and 3 deletions

View File

@ -21,7 +21,7 @@ _setup_dirs
_create_python_virtualenv "debian"
_build_runtime
_build_docs "debian"
_copy_code
_copy_code "debian"
_generate_sbom
#

View File

@ -212,7 +212,8 @@ _build_docs() {
_copy_code() {
echo "Copying the server code..."
if [ "$2" == 'redhat' ] && [ "${OS_VERSION}" == "8" ]; then
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F "=" '{ print $2 }' | sed 's/"//g' | awk -F "." '{ print $1 }')
if [ "$1" == 'redhat' ] && [ "${OS_VERSION}" == "8" ]; then
echo "Setting file permission through umask..."
umask u+rwx,go+rx,go-w
fi

View File

@ -25,7 +25,7 @@ _setup_dirs
_create_python_virtualenv "redhat"
_build_runtime
_build_docs "redhat"
_copy_code
_copy_code "redhat"
_generate_sbom
# Get an RPM-compatible version number
@ -124,6 +124,10 @@ cp -rfa %{pga_build_root}/desktop/* \${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,755)
%attr(755,root,root) /usr/pgadmin4/bin/setup-web.sh
%attr(755,root,root) /usr/pgadmin4/bin/pgadmin4
%attr(755,root,root) /usr/pgadmin4/web/pgacloud/pgacloud.py
%attr(755,root,root) /usr/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py
/usr/pgadmin4/bin/*
/usr/share/icons/hicolor/128x128/apps/*
/usr/share/icons/hicolor/64x64/apps/*