ghantoos / lshell

lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
GNU General Public License v3.0
434 stars 113 forks source link

Fix permission denied error from logrotate. #183

Closed georgpad-zz closed 6 years ago

georgpad-zz commented 6 years ago

When tried to logrotate the log I've got a permission denied error:

# logrotate -f /etc/logrotate.d/lshell 
error: error opening /var/log/lshell/user1.log: Permission denied
# ls -l /var/log/lshell/user1.log 
-rw------- 1 user1 sysadmins1 85 Nov 10 10:26 user1.log
~# id user1
uid=1017(user1) gid=1112(sysadmins1) groups=1112(sysadmins1),3(sys),4(adm),33(www-data),120(lshell)

To solve permissions over logrotate, we have to use root instead of nobody user.

ghantoos commented 6 years ago

thanks @georgpad !