Line
Link Here
|
0 |
-- check_perms.orig 2004-06-10 09:26:22.717024396 -0600 |
0 |
++ check_perms 2004-06-09 16:27:49.000000000 -0600 |
Lines 313-335
Link Here
|
313 |
print _('checking permissions on list data') |
313 |
print _('checking permissions on list data') |
314 |
# BAW: This needs to be converted to the Site module abstraction |
314 |
# BAW: This needs to be converted to the Site module abstraction |
315 |
for dir in os.listdir(mm_cfg.LIST_DATA_DIR): |
315 |
for dir in os.listdir(mm_cfg.LIST_DATA_DIR): |
316 |
for file in checkfiles: |
316 |
if dir != '.keep': |
317 |
path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file) |
317 |
for file in checkfiles: |
318 |
if STATE.VERBOSE: |
318 |
path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file) |
319 |
print _(' checking permissions on: %(path)s') |
319 |
if STATE.VERBOSE: |
320 |
try: |
320 |
print _(' checking permissions on: %(path)s') |
321 |
mode = statmode(path) |
321 |
try: |
322 |
except OSError, e: |
322 |
mode = statmode(path) |
323 |
if e.errno <> errno.ENOENT: raise |
323 |
except OSError, e: |
324 |
continue |
324 |
if e.errno <> errno.ENOENT: raise |
325 |
if (mode & targetmode) <> targetmode: |
325 |
continue |
326 |
STATE.ERRORS += 1 |
326 |
if (mode & targetmode) <> targetmode: |
327 |
print _('file permissions must be at least 660: %(path)s'), |
327 |
STATE.ERRORS += 1 |
328 |
if STATE.FIX: |
328 |
print _('file permissions must be at least 660: %(path)s'), |
329 |
print _('(fixing)') |
329 |
if STATE.FIX: |
330 |
os.chmod(path, mode | targetmode) |
330 |
print _('(fixing)') |
331 |
else: |
331 |
os.chmod(path, mode | targetmode) |
332 |
print |
332 |
else: |
|
|
333 |
print |