pkolaczk / fclones

Efficient Duplicate File Finder
MIT License
1.87k stars 70 forks source link

fclones: warn: Permission denied (os error 13) #147

Closed clort81 closed 1 year ago

clort81 commented 1 year ago

Would be nice to report which file caused permission denied.

pkolaczk commented 1 year ago

It generally does warn which file causes permission denied. Can you provide more context, reproduction steps?

clort81 commented 1 year ago

Hm usually I get filename if i don't have r/w permission. Perhaps it was an immutable file with chattr +i.
It's built on aarch64. Filesystem was ext4. I can't think of other info to report, sorry.

pkolaczk commented 1 year ago

Which fclones command was that? Did you get it when grouping or when removing duplicates?

clort81 commented 1 year ago

fclones group . > dupes.txt

clort81 commented 1 year ago

I'll try to recreate the behavior. Thanks for your attention. And thanks for the great software.

clort81 commented 1 year ago

alright trying it again on a big merge (3 million files) i see `[2022-08-20 02:48:37.970] fclones: info: Started grouping

[2022-08-20 02:57:21.701] fclones: warn: Permission denied (os error 13)

[2022-08-20 02:57:21.702] fclones: warn: Permission denied (os error 13)

[2022-08-20 02:57:21.768] fclones: warn: Permission denied (os error 13)

[2022-08-20 02:57:21.768] fclones: warn: Permission denied (os error 13)`

Before running it i did a chown -R user:user * to ensure that I owned all the files. There ought to be some tweak to report what files are problematic. I don't speak Rust though.

pkolaczk commented 1 year ago

Thank you for the logs, that's very useful. I conclude those warnings come from the directory walking code (walk.rs). Probably a missing map_err somewhere to provide error context.