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

Commit bdc0e6f

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.
1 parent 6fddedc commit bdc0e6f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
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|

defaults/main.yml

Lines changed: 1 addition & 1 deletion
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)