def _posix_plugin_key_creation_command(self, pubkey_hex: str) -> str:
        """creates the dir (dir_path), writes the key in file, and sets permissions to 644"""
        dir_path: str = os.path.dirname(self.keyfile_posix)
        sh_command = (
                     f"mkdir -p {dir_path} "  # create the /etc/electrum dir
                     f"&& printf '%s' '{pubkey_hex}' > {self.keyfile_posix} "  # write the key to the file
                     f"&& chmod 644 {self.keyfile_posix} "  # set read permissions for the file
                     f"&& chmod 755 {dir_path}"  # set read permissions for the dir
        )
        return sh_command
creates the dir (dir_path), writes the key in file, and sets permissions to 644
electrum/plugin.py