Can't send file to trash in NTFS partition. [SOLVED]

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Eien

Can't send file to trash in NTFS partition. [SOLVED]

Post by Eien »

Hello,

I have windows 10 and linux mint in dual boot:
- one SDD (500 G) with windows 10
- another SDD (128) with linux mint 19.1 cinnamon edition
- and an HDD (1T) i use for storage.

When i try to send files in the trash from the HDD (with en NTFS partition) i have an error.

After looking up in the forums i've found that my problem could be solved by adding uid=1000 for my HDD drive in ftsab file located in the etc directory.
Someone wrote that it could be easier to use the software ntfs-config.

I tried ntfs-config and it seems to mount ntfs partitions but i'm not sure it's adding uid=1000.

Code: Select all

/dev/sda1: UUID="E5A0-25CF" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="4225eab2-f261-4a49-ac41-c5c09355361f"
/dev/sda2: UUID="5d6f70bd-0c14-429e-8c3b-0ead825ea4fa" TYPE="ext4" PARTUUID="1e112f78-87fc-49ac-88fa-a20c3ed2bcb7"
/dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="e5c075d2-37aa-498c-9672-7ec2e087d744"
/dev/sdb2: LABEL="++ 1000 G  WESTERN DIGITAL RED" UUID="6C902F07902ED6FC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="fe8d3721-a30c-4a71-9869-c70c55e5d20d"
/dev/sdc1: LABEL="RM-CM-)cupM-CM-)ration" UUID="38A264AEA26471F4" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="08d72cd7-88e4-49af-801a-a757cfd21d67"
/dev/sdc2: UUID="0A64-C66B" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="a807ecc6-0d44-437e-b563-5f446b989de3"
/dev/sdc3: PARTLABEL="Microsoft reserved partition" PARTUUID="0f28a723-0e92-4d97-b02b-579a16e1edc3"
/dev/sdc4: UUID="40E06A85E06A80D0" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="7c278def-5864-47a0-a504-e0c00ed989fb"

Code: Select all

 # /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sda2 :
UUID=5d6f70bd-0c14-429e-8c3b-0ead825ea4fa	/	ext4	errors=remount-ro	0	1
#Entry for /dev/sda1 :
UUID=E5A0-25CF	/boot/efi	vfat	umask=0077	0	1
#Entry for /dev/sdc1 :
#Entry for /dev/sdc4 :
UUID=40E06A85E06A80D0	/media/sdc4	ntfs	defaults,nls=utf8,umask=0222	0	0
#Entry for /dev/sdb2 :
/swapfile	none	swap	sw	0	0
Hopefully i didn't mess up the ftsab file with the software ntfs-config (i ticked all the checkbox mount and read internal and external then unchecked them).

Can someone please help me edit the ftsab file. I'm new to linux and i'm worried to mess with the partitions and end up enable to boot the computer.
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.
WharfRat

Re: Can't send file to trash in NTFS partition.

Post by WharfRat »

Change your ntfs fstab mount options entry to defaults,nls=utf8,umask=0222,uid=1000,gid=1000 then remount it.
Eien

Re: Can't send file to trash in NTFS partition.

Post by Eien »

Thank you for your help!

I'm trying to learn and understand in the same time.

- sda is my SDD with linux mint
- sdc the SDD with windows 10
- sdb the HDD for storage

So i need to take ownership of sdc: SSD with windows 10 by using the line you gave me (defaults,nls=utf8,umask=0222,uid=1000,gid=1000) to be able to send files in the trash in sdb because sdb has an ntfs partition created by sdc/windows10?

I'm sorry if i completly misunderstood im' just truing to understand in the process. Don't hesitate to correct and educate me. Thank you.

Should my fstab file look like this?

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sda2 :
UUID=5d6f70bd-0c14-429e-8c3b-0ead825ea4fa	/	ext4	errors=remount-ro	0	1
#Entry for /dev/sda1 :
UUID=E5A0-25CF	/boot/efi	vfat	umask=0077	0	1
#Entry for /dev/sdc1 :
#Entry for /dev/sdc4 :
UUID=40E06A85E06A80D0	/media/sdc4	ntfs	defaults,nls=utf8,umask=0222,uid=1000,gid=1000 	0	0
#Entry for /dev/sdb2 :
/swapfile	none	swap	sw	0	0


UUID=38A264AEA26471F4 /media/RM_CM__cupM_CM__ration ntfs defaults,nls=utf8,umask=0222,noauto 0 0
UUID=6C902F07902ED6FC /mnt/6C902F07902ED6FC ntfs defaults,nls=utf8,umask=0222,nosuid,nodev,x-gvfs-show 0 0
WharfRat

Re: Can't send file to trash in NTFS partition.

Post by WharfRat »

The ntfs file system does not store file owner:group and mode bits so they have to be 'faked' with the dmask,fmask,uid=1000 and gid=1000 ntfs mount options.

So the result is all files will show the same owner:group and mode bits.

Your mount options for /media/sdc4 are fine :wink:
Eien

Re: Can't send file to trash in NTFS partition.

Post by Eien »

Thank you for the explanation.

After editing the fstab I went to the disk utity to unmount and remount the partition. But I must have done something wrong.
When I rebooted my computer, it started in terminal mode tty1 asking me for my login and password.

I've tried to access fstab from the terminal with to edit it back but it says read only..

I can boot on windows
Last edited by Eien on Mon May 06, 2019 11:30 am, edited 1 time in total.
WharfRat

Re: Can't send file to trash in NTFS partition.

Post by WharfRat »

I would recommend avoiding the Disks application for manipulating fstab or mounting partitions.

I would also recommend removing these
UUID=38A264AEA26471F4 /media/RM_CM__cupM_CM__ration ntfs defaults,nls=utf8,umask=0222,noauto 0 0
UUID=6C902F07902ED6FC /mnt/6C902F07902ED6FC ntfs defaults,nls=utf8,umask=0222,nosuid,nodev,x-gvfs-show 0 0


In the terminal use sudo nano /etc/fstab to modify your fstab entries.

When done sudo umount /media/sdc4 then sudo mount /media/sdc4
Eien

Re: Can't send file to trash in NTFS partition.

Post by Eien »

I'm going to avoid them from now on and edit fstab manually.

I've tried sudo nano /etc/fstab but it says:
can't create directory /root/.local/share/nano/ : for system accessible in read only

I can see the content on the file but I can't modify it.
WharfRat

Re: Can't send file to trash in NTFS partition.

Post by WharfRat »

Something has gone awry here - nano should work :?

As an alternative boot the installation live media, open the terminal and mount your linux partition with sudo mount /dev/sda2 /mnt

Then sudo cp /mnt/etc/fstab /mnt/etc/fstab.bak followed with sudo nano /mnt/etc/fstab

Comment out anything you added for now to get the system to boot normally.

When done exit the live session and boot normally.
Eien

Re: Can't send file to trash in NTFS partition.

Post by Eien »

I booted in live usb, opened terminal and entered the commands.

This time nano worked. I could edit the fstab.

When I rebooted it came bake to the terminal tty1 and when I enter the command sudo nano /etc/fstab from there it still says: impossible to create directory.. file system accessible in read only
WharfRat

Re: Can't send file to trash in NTFS partition.

Post by WharfRat »

Try sudo mount -vo remount,rw / to remount it read write.

I would need to see what that file looks like now.

I don't know why it's not booting to the desktop :?
Eien

Re: Can't send file to trash in NTFS partition.

Post by Eien »

This is how the fstab looks like now:
https://i.postimg.cc/kGSHhpLr/20190506-191323.jpg

The last command you've asked me to try also gave an error saying read only in the tty1 terminal.

And mount: overlay mounted on/. In the live usb


I'm sorry I wish I could be more helpful but it's all new to me.

Thanks for taking the time to help!
WharfRat

Re: Can't send file to trash in NTFS partition.

Post by WharfRat »

You removed your mount entry for the / partition :shock:

I took entries from your prior post and cleaned it up a bit so copy and paste the following replacing everything you have in there now.

It would be best if you did this from the live session so you can copy and paste from there rather than typing in the lines.

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

#Entry for /dev/sda2 :
UUID=5d6f70bd-0c14-429e-8c3b-0ead825ea4fa	/	ext4	errors=remount-ro	0	1
#Entry for /dev/sda1 :
UUID=E5A0-25CF	/boot/efi	vfat	umask=0077	0	1
UUID=40E06A85E06A80D0	/media/sdc4	ntfs	defaults,nls=utf8,umask=0222,uid=1000,gid=1000 	0	0
/swapfile	none	swap	sw	0	0
Eien

Re: Can't send file to trash in NTFS partition.

Post by Eien »

EVERYTHING IS WORKING!!!

Thank you so much!

Thank you for your patience and for your help.
Hopefully i will learn quicly not to make silly mistakes like this one.
If feels like if i didn't go with the graphical utilities and went the traditional way from the start, (the right way) i would have saved myself and yourself all the trouble.

Anyway lesson learned!

Thanks for sharing your knowledge..
WharfRat

Re: Can't send file to trash in NTFS partition.

Post by WharfRat »

Eien wrote: Mon May 06, 2019 2:49 pm
Hopefully i will learn quicly not to make silly mistakes like this one.

Anyway lesson learned!

Thanks for sharing your knowledge..
Everyone learns from their mistakes, but when in doubt it's OK to ask first.

As you found out you have to be especially careful with system file.

Enjoy your Linux experience :wink:
Locked

Return to “Storage”