snowflakedb/snowflake-cli

SNOW-1007798: Bad Owner Warning - config.toml

Closed this issue · 3 comments

SnowCLI version

SnowCLI Version: 2.0.0a3

Python version

Python 3.8.18

Platform

macOS-10.16-x86_64-i386-64bit

What happened

When running snow object to load the yaml file up to the Snowflake stage I get a warning that the config.toml has a bad owner or bad permissions. I tried changing the owner with chown or using chmod to change the permissions - but the error persists.

Console output

/Users/mchilds/opt/anaconda3/lib/python3.8/site-packages/snowflake/connector/config_manager.py:344: UserWarning: Bad owner or permissions on /Users/mchilds/Library/Application Support/snowflake/config.toml. To change owner, run `chown $USER /Users/mchilds/Library/Application Support/snowflake/config.toml`. To restrict permissions, run `chmod 0600 /Users/mchilds/Library/Application Support/snowflake/config.toml`.
  warn(f"Bad owner or permissions on {str(filep)}{chmod_message}")

How to reproduce

snow object stage copy ./convert-api.yaml @specs --overwrite --connection CONTAINER_hol

Had this same issue today with 2.0.0rc2. It looks like when the config.toml file first got created it had broader permissions, screenshot below. I was able to resolve the warning message by running the recommended chmod 0600 "/Users/[username]/Library/Application Support/snowflake/config.toml"
FIlePermissions

Big props to @sfc-gh-lspiegelberg for adding the chmod suggestion!