Skip to content
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

ipfs ls should behave like ls when called on individual files. #4186

Open
Stebalien opened this issue Aug 30, 2017 · 4 comments
Open

ipfs ls should behave like ls when called on individual files. #4186

Stebalien opened this issue Aug 30, 2017 · 4 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@Stebalien
Copy link
Member

Version information:

go-ipfs version: 0.4.11-dev-48476b292
Repo version: 5
System version: amd64/linux
Golang version: go1.8.3

Type:

Bug?

Severity:

Very Low

Description:

In the past, ipfs ls /ipfs/Qm.../file.txt listed the internal blocks in the file. Now, it just prints an error. In the near future, it looks like it will go back to listing internal blocks (restoring the original behavior).

Really, it should behave like the standard unix ls command and print the filename (if available in this context) and, in the future when we support them, any unix permissions on the file. Basically, internally, we should be listing the parent directory and then filtering out all files except the target file.

The tricky part is what to do when we don't know the parent directory (when the file is named by hash). I'd be inclined to print the file hash as the file name and set the permissions to 0777.

@Kubuxu
Copy link
Member

Kubuxu commented Aug 31, 2017

The permission might be better being 444 (read online for all).

@Stebalien
Copy link
Member Author

Ah. Good point but I'd say 555 (+x) by default for convenience. Otherwise, one wouldn't be able to, e.g., execute /ipfs/QmId....

@Kubuxu
Copy link
Member

Kubuxu commented Aug 31, 2017

You are not able to execute it from fuse interface right now either way.

@Stebalien
Copy link
Member Author

True. But once start storing an executable bit, I'd mark bare files as executable.

@whyrusleeping whyrusleeping added the kind/enhancement A net-new feature or improvement to an existing feature label Aug 31, 2017
@djdv djdv self-assigned this May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants