Trying to use trash put and trash restore on a mounted volume (mounted on for example /run/media/username/volumename/) seemingly tries to access /run/.Trash-1000 and fails. trash list however works as expected.
Username: username
Mounted BtrFS volume named volumename
Put file in trash
Steps to reproduce
Have an empty trash bin
Navigate to the root directory of a mounted volume under /run such as /run/media/username/volumename/
nix-shell -p trashy
trash list
touch test
trash put test
trash list
Observed
The file test is still present in the directory, and the trash bin is empty. trash list shows no files before or after.
trash put test gives this error:
error: Error during a `trash` operation: Unknown { description: "Path: '\"/run/.Trash-1000\"'. Message: Permission denied (os error 13)" }
Expected
The file test is removed from the directory and is then listed with trash list.
Counterexample
Have an empty trash bin
Navigate to ~/
nix-shell -p trashy
trash list
touch test
trash put test
trash list
Observed
The file test is removed from the directory and is then listed with trash list.
Restore file from trash
Steps to reproduce
Have an empty trash bin
Navigate to the root directory of a mounted volume under /run such as /run/media/username/volumename/
touch test
Use a file explorer to put test into the trash
Confirm that test shows up in the trash bin
nix-shell -p trashy
trash list
trash restore test
Type y and Enter
trash list
Observed
Both before and after trash restore, the file test shows up under the path /run/, missing the media/username/volumename/ path components. The file remains in the trash bin and does not exist in the current working directory.
trash restore test gives this error:
error: Error during a `trash` operation: Unknown { description: "Path: '\"/run/test\"'. Message: Permission denied (os error 13)" }
Expected
The file test is listed with trash list, then is restored to the current working directory and is no longer listed with trash list. The trash bin is empty.
Counterexample
Have an empty trash bin
Navigate to ~/
touch test
Use a file explorer to put test into the trash
Confirm that test shows up in the trash bin
nix-shell -p trashy
trash list
trash restore test
Type y and Enter
trash list
Observed
The file test is listed with trash list, then is restored to the current working directory and is no longer listed with trash list. The trash bin is empty.
Trying to use
trash put
andtrash restore
on a mounted volume (mounted on for example/run/media/username/volumename/
) seemingly tries to access/run/.Trash-1000
and fails.trash list
however works as expected.Setup
NixOS 24.05.20240323.44d0940 (Uakari) x86_64
nix-channel --list
:Username:
username
Mounted BtrFS volume namedvolumename
Put file in trash
Steps to reproduce
/run
such as/run/media/username/volumename/
nix-shell -p trashy
trash list
touch test
trash put test
trash list
Observed
The file
test
is still present in the directory, and the trash bin is empty.trash list
shows no files before or after.trash put test
gives this error:error: Error during a `trash` operation: Unknown { description: "Path: '\"/run/.Trash-1000\"'. Message: Permission denied (os error 13)" }
Expected
The file
test
is removed from the directory and is then listed withtrash list
.Counterexample
~/
nix-shell -p trashy
trash list
touch test
trash put test
trash list
Observed
The file
test
is removed from the directory and is then listed withtrash list
.Restore file from trash
Steps to reproduce
/run
such as/run/media/username/volumename/
touch test
test
into the trashtest
shows up in the trash binnix-shell -p trashy
trash list
trash restore test
y
and Entertrash list
Observed
Both before and after
trash restore
, the filetest
shows up under the path/run/
, missing themedia/username/volumename/
path components. The file remains in the trash bin and does not exist in the current working directory.trash restore test
gives this error:error: Error during a `trash` operation: Unknown { description: "Path: '\"/run/test\"'. Message: Permission denied (os error 13)" }
Expected
The file
test
is listed withtrash list
, then is restored to the current working directory and is no longer listed withtrash list
. The trash bin is empty.Counterexample
~/
touch test
test
into the trashtest
shows up in the trash binnix-shell -p trashy
trash list
trash restore test
y
and Entertrash list
Observed
The file
test
is listed withtrash list
, then is restored to the current working directory and is no longer listed withtrash list
. The trash bin is empty.