"Cannot move file to trash" in symlinked directories on /data partition

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Divi56
Level 1
Level 1
Posts: 12
Joined: Sat Apr 10, 2021 1:50 pm

"Cannot move file to trash" in symlinked directories on /data partition

Post by Divi56 »

Hello,
It's been nearly two weeks now that I've been trying (part-time!) to get my laptop operational with Linux, and I still find hard to solve some of the problems. Among them, the system doesn't let me move files to trash and only offers me to delete them immediately when I try it in a symlinked directory on the /data partition I mounted.

The solution suggested here doesn't seem to work for me, since the symbolic links in /home are lost when I reboot the computer. I understand that it worked here too, but I don't know where to add the gid and uid in the parameters.

Here's the line of my /data partition in fstab:
UUID=695cb774-ec65-4330-a7b3-6b413d7899a0 /data ext4 defaults,x-gvfs-show,x-gvfs-name=Roadennoù 0 2

I also tried to add a .Trash-1000 directory in my /data/[username] directory, but it didn't change anything. Neither did a symbolic link in this directory to the Trash directory (to /home/[username]/.local/share/Trash).

I dare hope that bugs reported in 2015 (here) don't exist anymore but I may be mistaken.

Any suggestion from you, experimented users of Linux Mint?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
PC 1 : Materiel.net Access | LM 20.3 Edge | Cinnamon | 5.13.0-25-generic x86_64 | Dual Core Intel Pentium Gold G6405 | 8 Go
PC 2 : Assembly | LM 20.3 | Cinnamon | 5.4.0-58-generic x86_64 | Intel Core i3-4030U | 3,89 Go | Intel HD Graphics Family
User avatar
spamegg
Level 14
Level 14
Posts: 5046
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: "Cannot move file to trash" in symlinked directories on /data partition

Post by spamegg »

My suggestion would be... stay away from symlinks.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: "Cannot move file to trash" in symlinked directories on /data partition

Post by Flemur »

Divi56 wrote: Thu May 13, 2021 8:45 am Here's the line of my /data partition in fstab:
UUID=695cb774-ec65-4330-a7b3-6b413d7899a0 /data ext4 defaults,x-gvfs-show,x-gvfs-name=Roadennoù 0 2
I use a similar setup, including symbolic links (which have never disappeared*), and there's a working .Trash-1000 folder.

The fstab entry is:

Code: Select all

LABEL=DATA  /mnt/DATA  ext4  defaults,user,exec,noatime     0 2
so try

Code: Select all

UUID=695cb774-ec65-4330-a7b3-6b413d7899a0 /data ext4 defaults,user,exec,noatime  0 2
*created like:

Code: Select all

ln -s /data/some-directory ~/linkname
~/linkname remains even if the partition that it links to is not mounted.

Edit: I deleted the .Trash-1000 directory on the data partition and it was automagically recreated when I "move(d) to trash" in a file browser.
Last edited by Flemur on Thu May 13, 2021 10:00 am, edited 1 time in total.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: "Cannot move file to trash" in symlinked directories on /data partition

Post by Flemur »

spamegg wrote: Thu May 13, 2021 9:20 amMy suggestion would be... stay away from symlinks.
Why? I've never had any problems with them. (I'm taking symlink to mean the link what you get from ln -s file link)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Divi56
Level 1
Level 1
Posts: 12
Joined: Sat Apr 10, 2021 1:50 pm

Re: "Cannot move file to trash" in symlinked directories on /data partition

Post by Divi56 »

Thank you, Flemur.
I've tried your change suggestion in fstab. I can access my directories through the symlinks I had set up, but I don't see the partition anymore. When I try to delete a file there, I still receive the error message. So, it doesn't work. I have thought that perhaps I should create the .Trash-1000 folder before modifying the fstab file but, if this folder is created automatically on your computer, it should do the same on mine, shouldn't it?
I don't think I had written a link name when I created them. Should I do it, using the names of the home directory?

@spamegg: Thank you for the suggestion. It doesn't help me, though. I'm quite ready to implement other solutions but 1) I'm already spending too much time trying to get my computer functional again after so many years with Windows; 2) I'm not a computer scientist and I'm struggling to understand so many posts in the forums before writing a question; 3) you don't suggest any other solution to separate data that I'd like to backup regularly and others, anyway.
PC 1 : Materiel.net Access | LM 20.3 Edge | Cinnamon | 5.13.0-25-generic x86_64 | Dual Core Intel Pentium Gold G6405 | 8 Go
PC 2 : Assembly | LM 20.3 | Cinnamon | 5.4.0-58-generic x86_64 | Intel Core i3-4030U | 3,89 Go | Intel HD Graphics Family
Locked

Return to “Installation & Boot”