luci-mod-system: sshkeys.js: create authorized_keys as 0600
Fixes: #3226 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
77a89299f4
commit
dffa9c57fe
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ function renderKeys(keys) {
|
|||
}
|
||||
|
||||
function saveKeys(keys) {
|
||||
return fs.write('/etc/dropbear/authorized_keys', keys.join('\n') + '\n')
|
||||
return fs.write('/etc/dropbear/authorized_keys', keys.join('\n') + '\n', 384 /* 0600 */)
|
||||
.then(renderKeys.bind(this, keys))
|
||||
.catch(function(e) { L.ui.addNotification(null, E('p', e.message)) })
|
||||
.finally(L.ui.hideModal);
|
||||
|
|
Loading…
Reference in a new issue