When I automatically mount NTFS partitions in Linux, I always use some files to report errors when extracting folders. I used the LS-lia command to check the permissions and found that all the NTFS partitions that are automatically mounted are root and belong to the plugdev group. Although I can still copy, remove, and edit files freely, there is always an error when extracting files.
I tried to use CHMOD and chown to change the owner of the entire NTFS partition to me and the permission to 777. Although the program prompts that the execution is successful, the LS-lia command does not work at all.
Using sudo Vim/etc/fstab, we found that the configuration is like this.
UUID = 58d03d91d03d767a/mounts/workdisk NTFS defaults, NLS = utf8, umask = 022, gid = 46 0 0
After checking the/etc/group, I found that gid = 46 is the plugdev group. Umask is a value less than 777, so the permissions are finally programmed as 755.
I made the following changes:
UUID = 58d03d91d03d767a/mounts/workdisk NTFS defaults, NLS = utf8, umask = 000, uid = 1000, gid = 1000 0 0
Umask is both 000, so the permissions are 777. I checked the/etc/passwd file and found that my account number is 1000, and my group number is also 1000, so I made the above changes.
After the system is restarted, all file owners in the NTFS partition are me. All permissions are 777. If you decompress the file, no error will be reported.
PS: When mounting a hard disk in the fstab file, try to use UUID instead of drive files such as/dev/sdb4. The driver updates the hard disk partition corresponding to this file every time it is restarted. If you use a format like/dev/sdb4, you may mount the wrong partition or report an error when inserting a USB flash drive or a mobile hard drive on your computer and restarting it.
Run the LS-L/dev/Disk/by-UUID/command to view the uuid of each partition.