Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I want to read a docx file in my dataiku folder through python recipes, but it returns permission denied. How can I change my folder access permissions?
# Read recipe inputs
Dataset_folder = dataiku.Folder("DYV5ukXU")
folder = Dataset_folder.get_info()
doc_path = os.path.join(folder["path"], "GDMS005_001.docx")
f = open(doc_path)
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
<ipython-input-4-da12e1b887da> in <cell line: 1>()
----> 1 f = open(doc_path)
PermissionError: [Errno 13] Permission denied: '/data/dataiku/dss_data/managed_folders/TUMING/DYV5ukXU/GDMS005_001.docx'
Operating system used: Windows 11
Hi,
To use the absolute path for the managed folder without getting permission error you need to meet the following conditions
1) You must run the job/recipe locally not in a container. If you use a container you must use the remote managed folder option get_download/upload_stream.
2) You must use get_path() API call to set appropriate ACLs and permission before being to call the path using "os" package. You can try something like this:
Dataset_folder = dataiku.Folder("DYV5ukXU")
folder = Dataset_folder.get_info()
path = folder.get_path()
doc_path = os.path.join(path, "GDMS005_001.docx")
https://developer.dataiku.com/latest/concepts-and-examples/managed-folders.html#detailed-examples
Thanks
Hi,
To use the absolute path for the managed folder without getting permission error you need to meet the following conditions
1) You must run the job/recipe locally not in a container. If you use a container you must use the remote managed folder option get_download/upload_stream.
2) You must use get_path() API call to set appropriate ACLs and permission before being to call the path using "os" package. You can try something like this:
Dataset_folder = dataiku.Folder("DYV5ukXU")
folder = Dataset_folder.get_info()
path = folder.get_path()
doc_path = os.path.join(path, "GDMS005_001.docx")
https://developer.dataiku.com/latest/concepts-and-examples/managed-folders.html#detailed-examples
Thanks