New issue 63 by signupna...@gmail.com: trash-put: trash: cannot trash
regular empty file `test': [Errno 13] Permission denied: '/.Trash-1000'
http://code.google.com/p/trash-cli/issues/detail?id=63
What steps will reproduce the problem?
1. touch /tmp/test
2. trash-put /tmp/test
trash-put: trash: cannot trash regular empty file `test': [Errno 13]
Permission denied: '/.Trash-1000'
What is the expected output? What do you see instead?
Expect a silent deleting of the program. See this error:
trash-put: trash: cannot trash regular empty file `test': [Errno 13]
Permission denied: '/.Trash-1000'
As root, it will delete normally without error.
If sudo makes /.Trash-1000 for the user, as expected the error goes away.
What version of the product are you using? On what operating system?
trash_cli-0.11.3_r315-py2.6.egg
Linux gateway-laptop 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011
x86_64 GNU/Linux
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=1
DISTRIB_CODENAME=debian
DISTRIB_DESCRIPTION="Linux Mint Debian Edition"
Please provide any additional information below.
Note that the file system is as below having a separate home partition
(where root's home location is hence no error).
/dev/sda5 on / type ext3 (rw,errors=remount-ro,commit=0)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda10 on /home type ext3 (rw,errors=remount-ro,commit=0)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,noexec,nosuid,nodev)
cgroup on /dev/cgroup/cpu type cgroup (rw,cpu)
(rw,nosuid,nodev,default_permissions,user=woodnt)
Regards,
Narnie
Dear Narnie,
thank you for your report.
Please send me output of these commands:
$ ls -lad ~ ~/.local ~/.local/share ~/.local/share/Trash/
~/.local/share/Trash/info/ ~/.local/share/Trash/files/
$ echo $HOME
$ echo $XDG_DATA_HOME
Thank you
Dear Andrea,
Here is the output of the requested information.
$ ls -lad ~ ~/.local ~/.local/share ~/.local/share/Trash/
~/.local/share/Trash/info/ ~/.local/share/Trash/files/
drwxr-x--x 58 woodnt woodnt 20480 Apr 15 22:24 /home/woodnt
drwxr-x--- 3 woodnt woodnt 4096 Mar 2 2010 /home/woodnt/.local
drwxr-x--- 13 woodnt woodnt 4096 Apr 16 01:51 /home/woodnt/.local/share
drwx------ 4 woodnt woodnt 4096 Apr 15 22:16
/home/woodnt/.local/share/Trash/
drwx------ 2 woodnt woodnt 4096 Apr 15 22:16
/home/woodnt/.local/share/Trash/files/
drwx------ 2 woodnt woodnt 4096 Apr 15 22:16
/home/woodnt/.local/share/Trash/info/
$ echo $HOME
/home/woodnt
$ echo $XDG_DATA_HOME
(in other words, no output, shell variable not assigned)
Kind Regards,
Narnie
It seems as if it is treating the root filesystem onto which /home is mount
as a removable drive hence wanting a trash folder for each user (but of
course a regular user has no right permissions for the root directory).
Root works because it's "home" location is on this root filesystem, not the
home partition where the regular users are.
I checked to see if the reverse is true, and it is similar. Root
trash-put-ing something in the home directory gives no error and makes a
/home/.Trash-0 folder.
Narnie
Comment #4 on issue 63 by andrea.f...@gmail.com: trash-put: trash: cannot
trash regular empty file `test': [Errno 13] Permission
denied: '/.Trash-1000'
http://code.google.com/p/trash-cli/issues/detail?id=63
Dear Narnie
I think I figured out the problem.
Currently trash-cli always trashes files moving they in a trash directory
of the same volume.
In your case the /tmp/test file belongs to the "/" volume. Unfortunately in
this volume there isn't any trash directory and none can be created (since
$HOME is on a different volume).
The trash spec address this issue letting the administrator create a
directory with the sticky bit in the $topdir of volumes that should support
trashing.
The following command should solve your issue:
sudo mkdir --mode=1777 /.Trash
Please let me know if works
Andrea