From 5e5aab7962586ea41d64b1c6a10ad4e2648eb157 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 14 Dec 2015 16:26:12 +0800 Subject: [PATCH] fix asset upload bug --- juser/user_api.py | 2 +- templates/jasset/asset_add_batch.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/juser/user_api.py b/juser/user_api.py index 0db1d556e..ca9ac16c9 100644 --- a/juser/user_api.py +++ b/juser/user_api.py @@ -130,7 +130,7 @@ def gen_ssh_key(username, password='', """ logger.debug('生成ssh key, 并设置authorized_keys') private_key_file = os.path.join(key_dir, username+'.pem') - mkdir(key_dir, mode=0700) + mkdir(key_dir, mode=0777) if os.path.isfile(private_key_file): os.unlink(private_key_file) ret = bash('echo -e "y\n"|ssh-keygen -t rsa -f %s -b %s -P "%s"' % (private_key_file, length, password)) diff --git a/templates/jasset/asset_add_batch.html b/templates/jasset/asset_add_batch.html index cedb53246..b3cab59c0 100644 --- a/templates/jasset/asset_add_batch.html +++ b/templates/jasset/asset_add_batch.html @@ -44,7 +44,7 @@
{{ smg }}
{% endif %}

请下载Excel文件, 按照格式填写主机信息, 上传导入. 点击下载模板

-
+