Sail Knowledgebase

Unprotected private key file

For tools such as Rsync and SSH (which Sail uses internally) it is important that permissions for the private key file are correct. If they're not, you will see this error: Unprotected private key file. Please fix permissions and try again.

If you like Sail, don't forget to give us a star on GitHub!

For Windows/WSL users

This error is most common on Windows installs using WSL. This is because by default Windows mounts the host filesystem (under /mnt/c for example) without support for metadata, causing all files and directories to have fully open permissions (0777).

To solve this problem, you can either move your entire Sail project outside of a host-mounted filesystem (to an ext4 partition for example) or re-mount the host system drive with metadata support:

sudo umount /mnt/c
sudo mount -t drvfs C: /mnt/c -o metadata

Make sure your private key permissions are set to 0600:

chmod 0600 path/to/.sail/ssh.key

For more information on the problem, refer to this GitHub issue.

For Linux/MacOS users

If you're seeing this problem on a Linux or MacOS install, you will need to change the permissions for the SSH private key using chmod:

chmod 0600 path/to/.sail/ssh.key

If you're still having trouble with this problem in Sail, please refer to our getting help section.