Results 1 to 8 of 8

Thread: Cant Move Files To Trash

  1. #1
    Join Date
    Feb 2006
    Beans
    195

    Cant Move Files To Trash

    I just moved my data in my home directory to a different ext4 partition.
    http://ubuntuforums.org/showthread.php?p=9532464

    Now when I try to delete any files from those directories I get the message:
    "Cannot move file to trash, do you want to delete it immediately"

    Why is that and how do I fix it?

  2. #2
    Join Date
    Jan 2010
    Location
    /usr/share/your_fridge
    Beans
    1,534
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Cant Move Files To Trash

    When you delete a file on an ext file system besides /home, it can not send it to trash because there is no trash cam for it. So it asks if you want to permanently delete it.
    "Meddle not with roos; thou art crunchy and grasshopper-like" ※The SABRFL※

    Last edited by ubunterooster; 1 Minute ago

  3. #3
    Join Date
    Feb 2006
    Beans
    195

    Re: Cant Move Files To Trash

    OK. Great.
    So how do I create a trash can?

    When I mount my NTFS drive I don't get this message.
    When I show hidden files the NTFS drive has a .Trash-1000 folder, which I guess is the trash can.

    Do I have to modify something in fstab to enable this feature?

  4. #4
    Join Date
    Jul 2009
    Location
    IIT Kanpur
    Beans
    346
    Distro
    Ubuntu Development Release

    Re: Cant Move Files To Trash

    Quote Originally Posted by ubunterooster View Post
    When you delete a file on an ext file system besides /home, it can not send it to trash because there is no trash cam for it. So it asks if you want to permanently delete it.
    Not true...I have 2 ext4 partitions besides home and / and I have Trash in all of them.
    Dell Studio 1555
    Intel P8600 2.4 GHz, 4GB DDR2 800MHz RAM, 512 MB ATI Mobility Radeon HD 4570, 320GB 5400 RPM WD Blue Scorpio

  5. #5
    Join Date
    Nov 2008
    Beans
    479
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Cant Move Files To Trash

    Can you try removing a file from the command line? Please provide the output too.
    Code:
    touch ~/temp.file
    gvfs-trash ~/temp.file
    (will create a temporary file in your home directory and then try to move it to trash)
    5127d464-4548-4993-a138-f546f2fd2a33

  6. #6
    Join Date
    Feb 2006
    Beans
    195

    Re: Cant Move Files To Trash

    If I run those commands in my home directory the file gets sent to the Trash.

    However, if I try in the sub-directories (the ones that are symlinked to another ext4 partition) I get the following error:
    Code:
    Error trashing file: Unable to find or create trash directory
    It seems like I need to create a Trash directory in that other partition, but I don't know how to do that.

  7. #7
    Join Date
    Feb 2006
    Beans
    195

    Re: Cant Move Files To Trash

    A bit of searching found the answer

    I changed my fstab entry
    Code:
    sudo cp /etc/fstab /etc/fstab.20100701
    gksudo gedit /etc/fstab
    Code:
    # /home was on /dev/sda8 during installation. moved it back to sda8 and put in a data partition
    UUID=9893d323-5290-4aba-aa72-7c79ebd4e14a /media/data           ext4    defaults,uid=1000        0       2
    I then remounted it
    Code:
    sudo umount /dev/sda8
    sudo mount -a
    Then created the magic folder for the trash and chown'd it
    Code:
    cd /media/data/
    sudo mkdir .Trash-1000
    sudo chown -R myUser:myUser .Trash-1000
    Magic

  8. #8
    Join Date
    Apr 2009
    Location
    Ireland
    Beans
    10
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Cant Move Files To Trash

    Quote Originally Posted by opticyclic View Post
    A bit of searching found the answer

    I changed my fstab entry
    Code:
    sudo cp /etc/fstab /etc/fstab.20100701
    gksudo gedit /etc/fstab
    Code:
    # /home was on /dev/sda8 during installation. moved it back to sda8 and put in a data partition
    UUID=9893d323-5290-4aba-aa72-7c79ebd4e14a /media/data           ext4    defaults,uid=1000        0       2
    I then remounted it
    Code:
    sudo umount /dev/sda8
    sudo mount -a
    Then created the magic folder for the trash and chown'd it
    Code:
    cd /media/data/
    sudo mkdir .Trash-1000
    sudo chown -R myUser:myUser .Trash-1000
    Magic

    On a fresh install of 10.04, this worked for me as well but, I had to put ',user' instead of ',uid=1000' to mount the volume.
    By putting ,uid=1000 it did not let me mount it complaining for bad options...

    Putting ,user and creating the .Trash-1000 on the volume it went ok.

    Now just to understand, as I am the only user on this machine that solution is fine. What if on the machine there would be more users? A .Trash-... for each user should be created?

    thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •