salt: salt-ssh trying to write to wrong log file path

I use salt-ssh with a Saltfile to change the location of most files. I ran a test with the current develop branch and this warning popped up. I can run 2015.8 without problems.

$ salt-ssh vagrant-test test.ping
[WARNING ] Failed to open log file, do you have permission to write to /path/to/salt/var/log/salt/master?

Relevant bits from my Saltfile:

salt-ssh:
  config_dir: ./config
  log_file: ./logs/ssh

Master config sets the root directory to the CWD:

root_dir: ./

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 24 (19 by maintainers)

Most upvoted comments

ssh_log_file: /tmp/salt-ssh-log.log option in the Saltfile works for me.

ssh_log_file instead of log_file

Confirmed: setting ssh_log_file explicitly does resolve this issue.

I am going to close this out, for 2 reasons:

  1. We are trying to migrate work to heist
  2. This issue is related to running salt as a non-root user where we have a number of issues that are path related. Those issues should be resolved which would encompass this

This seems to have had a regression at some point - with 2016.11 I’m getting similar errors.

Failed to create path "/var/log/salt/ssh" - [Errno 13] Permission denied: '/var/log/salt'