trash-cli icon indicating copy to clipboard operation
trash-cli copied to clipboard

how can I trash-list with sudo?

Open braindevices opened this issue 6 years ago • 2 comments

I have files have been sudo trash How can I show those files? If I do sudo trash-list it will say TrashDir skipped because parent not sticky: .../.Trash/0

after I did sudo -i. My id change to 0. In theory I should be able to trash-list the .Trash/0, but it does not

braindevices avatar Apr 25 '19 15:04 braindevices

I also met this question, there is no big guy can answer.

gebangfeng avatar Jun 23 '20 07:06 gebangfeng

Why don't you just set sticky bit? (chmod 1777 .Trash)

As Trash specification, .Trash dir must be set sticky bit, and accessible by all the users. Also see the issue #108.

In my environment, if available trash dir does not exist, trash v0.17.1.14 uses .Trash-$UID. Unsticky .Trash dir is considered unavailable, and .Trash-$UID is chosen instead.

I think trash v0.17.1.14 does at least follow the spec not to use unsticky .Trash.

KSR-Yasuda avatar Jun 24 '20 02:06 KSR-Yasuda