Destination /etc/fail2ban not writable
minecraftchest1 opened this issue · comments
Minecraftchest1 commented
I just build a playbook using this role and I am running into an issue when trying to update the fail2ban config. I am getting the following error.
TASK [geerlingguy.security : Copy fail2ban custom configuration file into place.] **********************************************************************************************************************************************************
fatal: [minecraftchest1-matrix.eastus.cloudapp.azure.com]: FAILED! => {"changed": false, "checksum": "ce41e7269276a49e2c26a78403b2cd3d75985d0c", "msg": "Destination /etc/fail2ban not writable"}
Dylan Mitchell commented
Just off the bat real quick, are you setting become to true? Seems like a permission issue to the directory for me.
…Sent from my iPad
On Mar 21, 2022, at 9:45 AM, Minecraftchest1 ***@***.***> wrote:
I just build a playbook using this role and I am running into an issue when trying to update the fail2ban config. I am getting the following error.
TASK [geerlingguy.security : Copy fail2ban custom configuration file into place.] **********************************************************************************************************************************************************
fatal: [minecraftchest1-matrix.eastus.cloudapp.azure.com]: FAILED! => {"changed": false, "checksum": "ce41e7269276a49e2c26a78403b2cd3d75985d0c", "msg": "Destination /etc/fail2ban not writable"}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Minecraftchest1 commented
minecraftchest1@Docker:~$ ls -al /etc/fail2ban/
total 84
drwxr-xr-x 6 root root 4096 Mar 16 18:31 .
drwxr-xr-x 117 root root 12288 Mar 21 13:18 ..
drwxr-xr-x 2 root root 4096 Mar 16 18:28 action.d
-rw-r--r-- 1 root root 2816 Nov 23 2020 fail2ban.conf
drwxr-xr-x 2 root root 4096 Jul 12 2021 fail2ban.d
drwxr-xr-x 3 root root 4096 Mar 16 18:28 filter.d
-rw-r--r-- 1 root root 24996 Nov 23 2020 jail.conf
drwxr-xr-x 2 root root 4096 Mar 16 18:28 jail.d
-rw-r--r-- 1 root root 170 Mar 17 20:56 jail.local
-rw-r--r-- 1 root root 645 Nov 23 2020 paths-arch.conf
-rw-r--r-- 1 root root 2827 Nov 23 2020 paths-common.conf
-rw-r--r-- 1 root root 573 Nov 23 2020 paths-debian.conf
-rw-r--r-- 1 root root 738 Nov 23 2020 paths-opensuse.conf
minecraftchest1@Docker:~$
I haven't changed any permissions.
Dylan Mitchell commented
I’m talking about the playbook configuration not the actually files that get placed on the target. I’ve seen that error with other ansible and it usually comes down to forgetting to tell ansible it has to become a super user.
```
- name: playbook
become: true
roles:
- geerlingguy/security
```
…Sent from my iPad
On Mar 21, 2022, at 12:07 PM, Minecraftchest1 ***@***.***> wrote:
***@***.***:~$ ls -al /etc/fail2ban/
total 84
drwxr-xr-x 6 root root 4096 Mar 16 18:31 .
drwxr-xr-x 117 root root 12288 Mar 21 13:18 ..
drwxr-xr-x 2 root root 4096 Mar 16 18:28 action.d
-rw-r--r-- 1 root root 2816 Nov 23 2020 fail2ban.conf
drwxr-xr-x 2 root root 4096 Jul 12 2021 fail2ban.d
drwxr-xr-x 3 root root 4096 Mar 16 18:28 filter.d
-rw-r--r-- 1 root root 24996 Nov 23 2020 jail.conf
drwxr-xr-x 2 root root 4096 Mar 16 18:28 jail.d
-rw-r--r-- 1 root root 170 Mar 17 20:56 jail.local
-rw-r--r-- 1 root root 645 Nov 23 2020 paths-arch.conf
-rw-r--r-- 1 root root 2827 Nov 23 2020 paths-common.conf
-rw-r--r-- 1 root root 573 Nov 23 2020 paths-debian.conf
-rw-r--r-- 1 root root 738 Nov 23 2020 paths-opensuse.conf
***@***.***:~$
I haven't changed any permissions.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
Minecraftchest1 commented
Thanks. That solved the issue.