You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2022/06/06 15:52:00 UTC

[jira] [Commented] (ARROW-16753) [C++] LocalFileSystem cannot list Linux directory recursively when permission to subdirectory contents are denied

    [ https://issues.apache.org/jira/browse/ARROW-16753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17550545#comment-17550545 ] 

Antoine Pitrou commented on ARROW-16753:
----------------------------------------

Well... besides the fact that listing everything under "/" is terrible performance-wise, the filesystem API is not really meant to provide a toolkit for arbitrary applications, rather it is meant primarily for usage by other Arrow subsystems such as the datasets layer.

That said, there may be a usecase for adding a "ignore_errors" option to FileSelector.

> [C++] LocalFileSystem cannot list Linux directory recursively when permission to subdirectory contents are denied
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: ARROW-16753
>                 URL: https://issues.apache.org/jira/browse/ARROW-16753
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 6.0.1
>         Environment: Ubuntu 20.04 LTS
>            Reporter: David Rauschenbach
>            Priority: Major
>
> The following code to list my root directory fails:
>  
> {code:java}
> FileSelector file_selector;
> file_selector.base_dir = "/";
> file_selector.allow_not_found = true;
> file_selector.recursive = true;
> auto result = fs.GetFileInfo(file_selector);{code}
> The result.ok() value returns {+}false{+}, and then result.status().message() returns {+}Cannot list directory '/var/run/wpa_supplicant'{+}. 
> An examination of the /run directory (which /var/run symlinks to) shows:
>  
> {code:java}
> $ ls -al /run
> drwxr-xr-x 35 root              root  1040 Jun  6 06:11 .
> drwxr-xr-x 20 root              root  4096 May 20 12:42 ..
> ...
> drwxr-x---  2 root              root    60 Jun  4 12:14 wpa_supplicant{code}
> And then attempting to list this directory reveals:
>  
> {code:java}
> $ ls -al /run/wpa_supplicant/
> ls: cannot open directory '/run/wpa_supplicant/': Permission denied{code}
>  
> As a user of LocalFileSystem, I should be able to list all of the files that I have access to.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)