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

mfs: unixfs 1.5 touch and chmod error on raw block #660

Closed
lidel opened this issue Aug 20, 2024 · 1 comment
Closed

mfs: unixfs 1.5 touch and chmod error on raw block #660

lidel opened this issue Aug 20, 2024 · 1 comment
Assignees
Labels
kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding need/triage Needs initial labeling and prioritization

Comments

@lidel
Copy link
Member

lidel commented Aug 20, 2024

Discussed with @gammazero and decided to extract this to separate issue, to unblock testing #653 in Kubo 0.30.0-rc1

After #653 we now have a bug in ipfs files touch and ipfs files chmod. They fail when we execute them against raw blocks.

Repro steps with ipfs/kubo#10478:

$  echo -n "hello path gw" | ipfs add --cid-version 1 -Q  --raw-leaves --to-files /raw-test-1
bafkreiehuhfvxn7w4i5hexlhq4a3y7jf5kfogsvmm5zlfxg5poj4oqozyu

$ ipfs files touch /raw-test-1
Error: expected a ProtoNode as internal node

$ ipfs files chmod 0644 /raw-test-1
Error: expected a ProtoNode as internal node

Hopefully we can add code that detects when node is a raw block and upgrade it to dag-pb before setting mode/time (somewhere around here). We have some prior art for detecting Raw blocks here.

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding need/triage Needs initial labeling and prioritization labels Aug 20, 2024
gammazero added a commit that referenced this issue Aug 20, 2024
gammazero added a commit that referenced this issue Aug 20, 2024
@gammazero
Copy link
Contributor

Fixed by PR #653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants