mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #210] Running dust in ~ gives error message "Did not have permissions for all directories" #98
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @drhumlen on GitHub (Feb 1, 2022).
Original GitHub issue: https://github.com/bootandy/dust/issues/210
First time I ran dust I chose deny when it asked for permission to a bunch of directories. Now that I've used the tool for a while, I want to grant it permission to those directories, but there's no way to grant it permission now? I even tried
brew uninstall dustand then re-installing it, but it still doesn't prompt me for permission again.@peterjc commented on GitHub (Feb 9, 2022):
Was this on macOS?
@drhumlen commented on GitHub (Feb 13, 2022):
@peterjc Yes
@bootandy commented on GitHub (Feb 16, 2022):
That sounds like a mac system level problem .
Try either:
sudo dust.@hamzamohdzubair commented on GitHub (Dec 16, 2022):
i have the same issue on linux, cannot run
sudo dust, because dust is not installed on root@AnkushMalaker commented on GitHub (Mar 19, 2023):
@hamzamohdzubair
You can use
which dustfrom your normal user where dust is installed, and then run
sudo /home/<user>/.cargo/bin/dust, for example.In my case, I still got the
Did not have permissions for all directorieserror and I'm running ubuntu.@Burnus commented on GitHub (Jun 14, 2023):
I have the same issue on MacOS. Running with
sudoproduces the same error. Would be nice if dust could tell me which directory it has an issue with.@bootandy commented on GitHub (Jul 13, 2023):
There are often a huge number of directories that it did not have permission for. However, your point it noted I'll leave this as a todo.
@Burnus commented on GitHub (Jul 13, 2023):
FWIW, my issue turned out to actually be broken permissions on some directory, not a bug in dust. Still, calling out the offending path in the error message would have made it easier to pin this down.
@DianaNites commented on GitHub (Jul 13, 2023):
I also get this on linux and can't figure out what path it is, as far as I can tell its fine but i could be missing something, having an option to list the erroring paths it encounters would really help.
@MithicSpirit commented on GitHub (Jul 15, 2023):
Running a command like
find . >/dev/nullcan be helpful for spotting the permission error. This discards stdout so all that's left are the errors in stderr, which should all be permission errors. As for adding support for showing the permission errors directly in dust it would be nice if it was kept behind a CLI flag (and printed to stderr instead of stdout).@Burnus commented on GitHub (Jul 15, 2023):
I know. That's basically what I ended up doing. Still, this can take a very long time on large data sets and/or slow disks and I think it's unnecessary since dust must already have identified the offending directory.
The message is already being printed to stderr and nobody advertised for changing that. As for the feature flag, I fail to understand what advantage this would provide. Does anyone prefer the generic error message over a specific one? Would there be a significant difference in runtime performance between the two approaches once you already support it on a type system level?
@lweiner-spirent commented on GitHub (Jul 25, 2023):
I am running on Linux (Ubuntu) as root, and have the error on a user directory.
The problem is this: the .ssh directory - to be functional for ssh usage - is required to have permissions for owner only... i.e. "
chmod 0755 .ssh" or "chmod u=rwx,go-rwx .ssh".In this case, the permissions are correct, root can read the files, but dust refuses to.
This behavior seems incorrect, inconsistent, and unpredictable (after trying a few tests) when used as root.
@DianaNites commented on GitHub (Aug 13, 2023):
Dust will incorrectly give this error whenever it is provided both a path and an exclusion
reproducer
You'll notice it will also not actually exclude the path, no matter how you specify it.
It will still error even if the excluded path does not exist.
@bootandy commented on GitHub (Aug 26, 2023):
I can reproduce your issue DianaNites - I'll look at this.
Edit: No I've forgotten how to use my own tool!
Run like this:
dust -X /tmp/dust/dir/ignore /tmp/dust/dir/if you run:
dust /tmp/dust/dir/ -X /tmp/dust/dir/ignoredust will look for 3 directories called:
/tmp/dust/dir/,-X,/tmp/dust/dir/ignoreand it won't find-Xand so it will print 'Did not have permissions for all directories'.