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
Please post the permissions of your file. Our library checks whether the file is readable by other https://github.com/snowflakedb/snowflake-connector-python/blob/25f2547f11f17701f54ac6409cea9c764a0027b3/src/snowflake/connector/config_manager.py#L329
Big props to @sfc-gh-lspiegelberg for adding the chmod
suggestion!