Skip to content

Commit

Permalink
New approach, just create nwe directories with mode 0755 regardless
Browse files Browse the repository at this point in the history
  • Loading branch information
fennm committed Jul 1, 2013
1 parent ed1b4c4 commit 2519c6d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/lib/Bcfg2/Client/Tools/POSIX/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,16 +706,10 @@ def _makedirs(self, entry, path=None):
(path, err))
rv = False

# we need to make sure that we give +x to everyone who needs
# it. E.g., if the file that's been distributed is 0600, we
# can't make the parent directories 0600 also; that'd be
# pretty useless. They need to be 0700.
# set auto-created directories to mode 755, if you need
# something else, you should specify it in your config
tmpentry = copy.deepcopy(entry)
newmode = int(entry.get('mode'), 8)
for i in range(0, 3):
if newmode & (6 * pow(8, i)):
newmode |= 1 * pow(8, i)
tmpentry.set('mode', oct_mode(newmode))
tmpentry.set('mode', '0755')
for acl in tmpentry.findall('ACL'):
acl.set('perms',
oct_mode(self._norm_acl_perms(acl.get('perms')) |
Expand Down

0 comments on commit 2519c6d

Please sign in to comment.