snowflakedb/snowflake-cli

SNOW-1206629: Homebrew: Create and Fix Permissions on config.toml During Installation

Closed this issue · 1 comments

Description

I installed the snowflake-cli via homebrew as per the README and ran snow --help as suggested. This returned the following warning:

/opt/homebrew/Cellar/snowcli/2.0.0/libexec/lib/python3.12/site-packages/snowflake/connector/config_manager.py:344: UserWarning: Bad owner or permissions on /Users/cwiese/Library/Application Support/snowflake/config.toml.
 * To change owner, run `chown $USER "/Users/cwiese/Library/Application Support/snowflake/config.toml"`.
 * To restrict permissions, run `chmod 0600 "/Users/cwiese/Library/Application Support/snowflake/config.toml"`.

  warn(f"Bad owner or permissions on {str(filep)}{chmod_message}")

It would be great if homebrew could create the file and set the permissions during the installation.

Context

Having homebrew create the file and set the correct permissions would provide a warning free installation experience to the user and remove the need to run additional commands.

This should no longer be a problem in 2.1.0 for new installations. For existing config.toml files users need to manually set the permissions. This is a one time action.