0

I am currently using Manjaro Linux and I want to mount my two NTFS partitions from Windows to the /mnt folder.

There are two ways to do this:

  1. After boot, I just simply click the partition shown in the side pane in Thunar
  2. Edit /etc/fstab

So far, I can successfully mount those two partitions using both ways, but I found when I use the second (fstab) way, I can't delete my files. (the terminal still works, but the graphic approach fails)

I did so searching, and found this:

https://wiki.archlinux.org/index.php/File_manager_functionality#Mounting

When I manually crate the trash folder, I can only delete the files permanently, However, I still can't move them into trash.

On the contrary, if I use the first way to mount my partitions, there is no such problems at all. I can delete any files, put them into trash, or delete them permanently as wish.

Please tell me what is the difference between those two methods and how can I achieve the same function using /etc/fstab (remove files to trash, instead of deleting them permanently)

Here is my fstab file:

UUID=F69F-6A73                            /boot/efi      vfat   defaults,noatime 0 2
UUID=c82389c8-2eba-4353-9a43-c0ff340d120d /              ext4   defaults,noatime,discard 0 1
UUID=083ef418-69f1-457d-be06-140cfb82bdde /home          ext4   defaults,noatime,discard 0 2
tmpfs                                     /tmp           tmpfs  defaults,noatime,mode=1777 0 0
UUID=1CAAFBA7AAFB7B98                     /mnt/work      ntfs   defaults,noatime
1

After some digging, I found the solution for my question. I clicked my share partion icon at the side pane in Thunar to trigger automatic mount and then I found the command in process. the options the automatic mount use is


/sbin/mount.ntfs /dev/sdb1 /mnt/work -o rw,nodev,nosuid,uid=1000,gid=1000,uhelper=udisks2

so my fstab goes like:

UUID=1CAAFBA7AAFB7B98   /mnt/work   ntfs  rw,nodev,nosuid,uid=1000,gid=1000,uhelper=udisks2

Now I can delete my files to trash or shift+delete it permanently and the partitions are automatically mounted to my wanted folder while booting.

| improve this answer | |
0

This is what I would do:

UUID=1CAAFBA7AAFB7B98   /mnt/work   ntfs-3g  defaults,windows_names,locale=en_US.utf8  0 0

These settings enable read and write on windows ntfs partitions/drives on boot.

| improve this answer | |
0

After some investigations and browsing I got the answer.

1) Thunar assumes moving to trash and never copying - it means that your file to be trashed (FTBT) and the trash directory has to be on the same filesystem.

2) If your FTBT is in your home directory, then Thunar will try to move it to ~/.local/share/Trash. In case the folder is on another partition the operation will fail.

3) If your FTBT is on some other filesystem (other partition, disk or nfs mount) Thunar will try to create .Trash-$UID folder in the filesystem top folder. You may have no permissions for that and the operation fails.

Lets assume you have second disk mounted in the /disk2 directory:

$ ls -ld /disk2
drwxr-xr-x 5 root root 4096 [some date] /disk2

And you have UID 1000:

$ echo $UID
1000

Then create a directory for your trash:

$ sudo mkdir /disk2/.Trash-1000
$ sudo chown 1000 /disk2/.Trash-1000
$ chmod og-rwx /disk2/.Trash-1000

Thunar should do the rest (subdirectory structure) and your trash should work.

I hope it helps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.