Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit e59dd46

Browse files
committed
fix sftp_umask; store as literal not octal
Numbers with leading zeros need to be quoted in Ansible, otherwise they are interpreted as octal. Which the templating happily writes out in... decimal. In this case, sftp_umask 0027 was ending up as 23 in sshd.conf. Signed-off-by: Alex Waite <alex@waite.eu>
1 parent 6fddedc commit e59dd46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
4747
|`ssh_print_motd` | false | false to disable printing of the MOTD|
4848
|`ssh_print_last_log` | false | false to disable display of last login information|
4949
|`sftp_enabled` | false | true to enable sftp configuration|
50-
|`sftp_umask` | 0027 | Specifies the umask for sftp|
50+
|`sftp_umask` | '0027' | Specifies the umask for sftp|
5151
|`sftp_chroot` | true | false to disable chroot for sftp|
5252
|`sftp_chroot_dir` | /home/%u | change default sftp chroot location|
5353
|`ssh_client_roaming` | false | enable experimental client roaming|

Diff for: defaults/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ sftp_enabled: false
153153
sftp_chroot: true
154154

155155
# sftp default umask
156-
sftp_umask: 0027
156+
sftp_umask: '0027'
157157

158158
# change default sftp chroot location
159159
sftp_chroot_dir: /home/%u

0 commit comments

Comments
 (0)