diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-03-21 15:51:33 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-03-21 15:51:33 +0000 |
commit | 2a61102e2883cf094ccac209c0f43e513ebef2cf (patch) | |
tree | 0b3daf9fe6d1c8ddf066181bec983b3384c8d074 | |
parent | ad4bc6e79d986b019d7d6a29ce864b792da5d658 (diff) | |
download | bcfg2-2a61102e2883cf094ccac209c0f43e513ebef2cf.tar.gz bcfg2-2a61102e2883cf094ccac209c0f43e513ebef2cf.tar.bz2 bcfg2-2a61102e2883cf094ccac209c0f43e513ebef2cf.zip |
Add error message for config file chown failure (Resolves Ticket #407)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2979 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Client/Tools/POSIX.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py index a7c0ee4e8..be7115828 100644 --- a/src/lib/Client/Tools/POSIX.py +++ b/src/lib/Client/Tools/POSIX.py @@ -288,6 +288,9 @@ class POSIX(Bcfg2.Client.Tools.Tool): os.chown(newfile.name, pwd.getpwnam(entry.get('owner'))[2], grp.getgrnam(entry.get('group'))[2]) except KeyError: + self.logger.error("Failed to chown %s to %s:%s" % \ + (entry.get('name'), entry.get('owner'), + entry.get('group'))) os.chown(newfile.name, 0, 0) os.chmod(newfile.name, calcPerms(S_IFREG, entry.get('perms'))) os.rename(newfile.name, entry.get('name')) |