Issue #670
closedinit scripts pulp_workers and pulp_celerybeat check number of blocks instead of file permissions on /etc/default/pulp_workers
Description
diff for fixing pulp_workers and pulp_celerybeat init scripts
Description of problem:
The init scripts for pulp_workers and pulp_celerybeat have a sanity check that verifies file permissions on the respective file in /etc/default/.
The scripts execute
local perm=$(stat -Lt "$path" | awk '{print $3}')
to get the permissions. This is afaik the block number instead of the permissions.
This worked fine until we switched the underlying disk when blocks went from 8 to 16 for the file /etc/pulp_workers.
use "0$(stat -c %a)" and $(stat -c %u) for owner looks better and works.
Version-Release number of selected component (if applicable): 2.5.1
How reproducible:
Have a /etc/defaults/pulp_workers file with 16 blocks in the file system.
Steps to Reproduce:
1. make sure 'stat /etc/default/pulp_workers' reports "Blocks: 16"
2. run service pulp_workers start
Actual results:
service pulp_workers status
celery init v10.0.
Error: Config script '/etc/default/pulp_workers' cannot be writable by group!
Resolution:
Review the file carefully and make sure it has not been
modified with malicious intent. When sure the
script is safe to execute with superuser privileges
you can change the scripts permissions:
$ sudo chmod 640 '/etc/default/pulp_workers'
Expected results:
celery init v10.0.
node celery is stopped...
node reserved_resource_worker-0 is stopped...
or running or whatever state the workers are in.
Additional info:
centos-6
+ This bug was cloned from Bugzilla Bug #1183706 +
Files