--logfile_mode flag does not properly set logfile permissions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Adam Gandelman | ||
Diablo |
Fix Released
|
Undecided
|
Unassigned | ||
nova (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
The default logfile_mode of 0644 is successfully enforced, however, using the flag to set permissions of logs to anything else results in incorrect permissions:
ubuntu@
ubuntu@
total 4.0K
--w----r-T 1 root root 1.1K 2011-09-30 03:40 nova-compute.log
ubuntu@
Access: (1204/--w----r-T) Uid: ( 0/ root) Gid: ( 0/ root)
ubuntu@
ubuntu@
total 4.0K
---x-wx--T 1 root root 1.6K 2011-09-30 03:41 nova-compute.log
ubuntu@
Access: (1130/---x-wx--T) Uid: ( 0/ root) Gid: ( 0/ root)
Changed in nova (Ubuntu): | |
importance: | Undecided → Low |
Changed in nova: | |
status: | New → Fix Committed |
Changed in nova: | |
milestone: | none → essex-1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
tags: |
added: verification-done removed: verification-needed |
Changed in nova: | |
assignee: | nobody → Adam Gandelman (gandelman-a) |
Changed in nova: | |
milestone: | essex-1 → 2012.1 |
At declaration of the flag, it looks like gflags converts the default logfile_mode octet "0644" to the proper decimal integer (420). When parsing argv or flagfile, gflags seems to convert the string to an integer, strips the leading zero and a decimal value (ie, 644) gets passed to os.chmod() in the end.
Patch proposed upstream @ https:/ /review. openstack. org/#change, 758