-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1825673: root
can not be checked for existence of SNOWFLAKE_HOME
due to permissions
#2108
Comments
root
can not be checked for existence of SNOWFLAKE_HOME
due to permissionsroot
can not be checked for existence of SNOWFLAKE_HOME
due to permissions
Hello @mikita-sakalouski , Thanks for raising the issue. This is a configuration issue. The error indicates the process is attempting to resolve SNOWFLAKE_HOME as /root/.snowflake , this can happen when If the script runs under the root user, it will try to use /root/.snowflake. If the process lacks permissions to access this path (common in restricted environments), the PermissionError occur. Also, please check the verified path for the connector So, please run as a non-root user with appropriate permissions or run via sudo command os.environ["SNOWFLAKE_HOME"] = "/tmp/snowflake" Regards, |
I hit this issue when deploying superset. Superset tries to load snowflake-sqlalchemy and it fails because of permission denied with /root/.snowflake . In our deployment, superset runs as non-root user but it still tries to load /root/.snowflake anyway. The real question though is why a library requires some directory to be accessible ? The workaround of setting SNOWFLAKE_HOME does work. |
Agree, the directory check looks like in wrong place, especially taking into account that is resolved during import of connector and not during real access, i will prefer snowflake library to handle it correctly with two options:
|
Exactly. Superset is not even trying to create a connection and the load fails. The relevant superset code is https://github.com/apache/superset/blob/dbcb473040b7e8ef1d41a81ba594387b66c04ebe/superset/db_engine_specs/__init__.py#L155 and that load() throws an exception of Permission Denied. |
Hello @mikita-sakalouski @gramakri , Thanks for the update and glad to hear setting SNOWFLAKE_HOME does work. Regards, |
It's because we resolve the folder as a module level constant only once here. |
Please have a look at #2111 |
Python version
3.11
Operating system and processor architecture
Linux-5.15.0-1071-aws-aarch64-with-glibc2.35
Installed packages
What did you do?
What did you expect to see?
Correct handling of denied access to
root
folderCan you set logging to DEBUG and collect the logs?
No response
The text was updated successfully, but these errors were encountered: