No recycle bin on second hard disk [solved]

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
fritze
Level 1
Level 1
Posts: 5
Joined: Thu Jun 17, 2021 9:07 am

No recycle bin on second hard disk [solved]

Post by fritze »

Hello community,

I didn't find the topic so I hope there is nothing double now.
I have my system (64 bit Cinnamon) on a SSD drive but most of my data on an internal HDD that is connected via links to the personal files. Since I re-installed my system the recycle bin for the data on the HDD doesn't work anymore. When I delete something, I got an error that it could not be moved to recycle bin and the details say no recycle bin could be found or created for this directory.

Do you have any idea for this issue?
Thanks in advance
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
fritze
Level 1
Level 1
Posts: 5
Joined: Thu Jun 17, 2021 9:07 am

Re: No recycle bin on second hard disk

Post by fritze »

Hello again,
sorry I don't want to bumb this topic but I have some new findings.
The problem seems to be the access rights. If I open the disk with administrator rights I can put files into the recycle bin. But as I wanted to change the owner from "root" to "USERNAME" it simply switched back to root. I also tried with chown -R $User: /directory but it didn't change anything.
User avatar
AndyMH
Level 21
Level 21
Posts: 13716
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: No recycle bin on second hard disk

Post by AndyMH »

Code: Select all

sudo chown -R $USER:$USER /directory
is the correct syntax, note USER uppercase, and the second for the group.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
fritze
Level 1
Level 1
Posts: 5
Joined: Thu Jun 17, 2021 9:07 am

Re: No recycle bin on second hard disk

Post by fritze »

Thanks Andy!
Unfortunately this changes nothing. Although the something was working for some seconds, the access rights remain the same - owner: root; group: root.
Today I had a similar problem with an USB drive were I suddenly was only able to read but not to write (it worked when I changed to administrator rights). When I tried to change it with chown it gave me the answer that this process is not allowed
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: No recycle bin on second hard disk

Post by Flemur »

fritze wrote: Fri Jun 18, 2021 11:28 am Thanks Andy!
Unfortunately this changes nothing. Although the something was working for some seconds, the access rights remain the same - owner: root; group: root.
What kind of partition is it and how is it mounted?
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
fritze
Level 1
Level 1
Posts: 5
Joined: Thu Jun 17, 2021 9:07 am

Re: No recycle bin on second hard disk

Post by fritze »

Its a NTFS partition with data. I used the disks program pre-installed in Mint to mount it for system start (nosuid,nodev,nofail,x-gvfs-show). Later I changed the mounting point from /mnt to /media because it was like that before I reset my system but the problem occurred in both places.
Thanks for your help, Flemur!
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: No recycle bin on second hard disk

Post by Flemur »

fritze wrote: Fri Jun 18, 2021 12:58 pmIts a NTFS partition with data.
That's why you can't change the permissions; with NTFS the files' owner(s) and permissions are defined by how the partition is mounted.
I used the disks program pre-installed in Mint to mount it for system start (nosuid,nodev,nofail,x-gvfs-show).
Try adding uid=1000,gid=1000 to the mount options.

Edit: with these mount options in /etc/fstab

Code: Select all

LABEL=BU_NTFS  /mnt/BU_NTFS  ntfs defaults,noauto,uid=1000,gid=1000,noatime,windows_names 0 2
When user root creates a file and a regular user creates a file, they're both owned by uid=1000 (namely me!); if I "move to trash" those files using a file browser, a new .Trash-1000 directory is created. (Note: noauto, above, means don't automagically mount it at boot).
Last edited by Flemur on Fri Jun 18, 2021 1:15 pm, 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?
fritze
Level 1
Level 1
Posts: 5
Joined: Thu Jun 17, 2021 9:07 am

Re: No recycle bin on second hard disk

Post by fritze »

Perfect, thank you so much! That worked out well.
What was it actually what I did?
User avatar
AndyMH
Level 21
Level 21
Posts: 13716
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: No recycle bin on second hard disk [solved]

Post by AndyMH »

ntfs does not have the same permissions as linux filesystems, e.g. ext4, so linux simulates them. Setting uid=1000,gid=1000 is assigning ownership of the mount point to you. The first user created in mint is assigned a uid of 1000, if you create another user that will be 1001 and so on.

In addition, windows doesn't allow the same range of characters in filenames. That's what the windows_names option is for - it stops you saving files with names that contain characters that are invalid in win.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: No recycle bin on second hard disk

Post by Flemur »

fritze wrote: Fri Jun 18, 2021 1:13 pm Perfect, thank you so much! That worked out well.
What was it actually what I did?
ntfs filesystems are accessed thru this 'fuse' software
https://en.wikipedia.org/wiki/Filesystem_in_Userspace
which makes them "look like" a regular linux-style partition, with owners and permissions, even though those things are not in the partition itself; what you did was set the parameters for that.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Locked

Return to “Storage”