aker-gateway / Aker

SSH bastion/jump host/jumpserver
Other
566 stars 71 forks source link

/var/log/aker/aker.log permissions prevent users from logging in #61

Open caroblack opened 6 years ago

caroblack commented 6 years ago

After a fresh install (idp=Json):

--

root@bastion:~# ls -l /var/log/aker/

total 0

root@bastion:~# ls -ld /var/log/aker/

drwxrwxrwx 2 root root 4096 Dec 20 16:15 /var/log/aker/

--

root@workstation:~# ssh user1@bastion

( Here Aker works as expected, but after a logout....)

Logout

--

root@bastion:~# ls -l /var/log/aker/

total 8

drwxrwxrwx 2 user1 user1 4096 Dec 20 16:18 20171220

-rw-r--r-- 1 user1 user1 856 Dec 20 16:18 aker.log

root@bastion:~# ls -ld /var/log/aker/

drwxrwxrwx 3 root root 4096 Dec 20 16:18 /var/log/aker/

--

root@workstation:~# ssh user2@bastion

user2@bastion's password:

Traceback (most recent call last):

File "/usr/bin/aker/aker.py", line 168, in Aker().build_tui() File "/usr/bin/aker/aker.py", line 117, in init level=config.log_level) File "/usr/lib/python2.7/logging/init.py", line 1547, in basicConfig hdlr = FileHandler(filename, mode) File "/usr/lib/python2.7/logging/init.py", line 913, in init StreamHandler.init(self, self._open()) File "/usr/lib/python2.7/logging/init.py", line 943, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 13] Permission denied: '/var/log/aker/aker.log'

Connection to bastion closed.

root@workstation:~#

--

The only workaround is to chmod 777 the aker log file.

anazmy commented 6 years ago

You're right, I suggest using the install playbook here to help you getting everything installed: https://github.com/aker-gateway/aker-freeipa-playbook