dust icon indicating copy to clipboard operation
dust copied to clipboard

"Did not have permissions for all directories" in mount point and its subdirectories

Open ggambetta opened this issue 1 year ago • 12 comments

dust works fine on my main SSD. However it doesn't seem to work at all on a secondary SSD I have mounted somewhere:

/dev/sda1 on /media/gabriel/Extra type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2)

$ pwd
/media/gabriel/Extra

$ dust
Did not have permissions for all directories (add --print-errors to see errors)
4.0K ┌── .│█████████████[...]███████████████████ │ 100%

$ ls
drwxrwxr-x   4 gabriel gabriel 4.0K Aug  4 12:17 SomeSubdirectory

$ dust --print-errors SomeSubdirectory
Did not have permissions for directories: SomeSubdirectory
4.0K ┌── SomeSubdirectory│█████████████[...]███████████████████ │ 100%

It doesn't seem to be a permissions issue, because the same happens with sudo. This is on Ubuntu 22, with dust 1.1.1.

ggambetta avatar Aug 04 '24 15:08 ggambetta

hello,I also have two SSDs on my laptop. The results of executing dust on these two SSDs are normal, so I need more information to locate this problem. Are there any special permissions set in this directory? For example, for lsattr operations, you can execute lsattr <you_directory_or_file> to see the execution result? Also, could you provide the results of running the dust command in the SomeSubdirectory directory?

wugeer avatar Aug 06 '24 05:08 wugeer

Thank you for looking into this!

There's no special attributes that I know of; I haven't set any, and the output of lsattr is the same as in the other filesystem where dust works fine.

Running dust in SomeSubdirectory gives the same error message.

$ pwd
/media/gabriel/Extra

$ lsattr .
--------------e------- ./SomeSubdirectory

$ lsattr SomeSubdirectory
--------------e------- SomeSubdirectory/registry.csv

$ cd SomeSubdirectory

$ lsattr .
--------------e------- ./registry.csv

$ dust --print-errors
Did not have permissions for directories: .
4.0K ┌── SomeSubdirectory│█████████████[...]███████████████████ │ 100%

$ cd /media/gabriel

$ lsattr .
--------------e------- ./Extra

Anything else I can take a look at?

ggambetta avatar Aug 06 '24 05:08 ggambetta

Tried chmod a+rwx /media/gabriel/Extra and I still get the same error. So, still unclear what permissions dust is missing.

ggambetta avatar Aug 06 '24 05:08 ggambetta

Oooh, this is interesting! Compiled from source, and that works on /media/gabriel/Extra perfectly fine!

ggambetta avatar Aug 06 '24 06:08 ggambetta

For sanity checking, I built from source at the 1.1.1 commit (dbd18f90e7b184d12f14533e76e5915dbe4a2051) and it still works. Not what I expected. So what's the difference between the 1.1.1 I'm building and the 1.1.1 I have installed? Must be a dependency?

ggambetta avatar Aug 06 '24 06:08 ggambetta

The release build also works. There goes another theory.

ggambetta avatar Aug 06 '24 06:08 ggambetta

I'm glad that your issue could be resolved. From my computer(arch linux), it appears that dust depends on very basic packages. Perhaps you can check the build script of the installed dust 1.1.1 program on ubuntu to find the differences between it and the local build. image image Also, you can contact Danie de Jager (danie.dejager) who is the publisher of 'dust' on Ubuntu Snap, to seek help. image

wugeer avatar Aug 06 '24 06:08 wugeer

For sanity checking, I built from source at the 1.1.1 commit (https://github.com/bootandy/dust/commit/dbd18f90e7b184d12f14533e76e5915dbe4a2051) and it still works. Not what I expected. So what's the difference between the 1.1.1 I'm building and the 1.1.1 I have installed? Must be a dependency?

That is very strange, not sure how that could happen.

bootandy avatar Aug 07 '24 18:08 bootandy

Happy to help debug this, please let me know if you want the output of some commands or to poke the system in some other way.

ggambetta avatar Aug 07 '24 20:08 ggambetta

I'm honestly not sure what to do. If you can think of some debugging by all means go for it.

I'm happy to write this off as a one off oddity though.

bootandy avatar Aug 08 '24 22:08 bootandy

I've already opened an issue with the package maintainer seeking help, and I hope there will be some progress. :) https://github.com/daniejstriata/dust-snap/issues/2

wugeer avatar Aug 16 '24 08:08 wugeer

Hello, I encountered this issue as well. I think the fix is to add information to the README.md that specifies that dust installed through snap can only access the /home folder. I will open a PR.

clouedoc avatar Oct 06 '24 12:10 clouedoc

Good idea, @clouedoc - thanks.

bootandy avatar Oct 17 '24 22:10 bootandy