When my Linux automount NTFS partition, I always use some files to report errors when I unzip folders. I checked the permissions with the ls-lia command and found that the owner of the NTFS partition of the automatic mount is root and belongs to the plugdev group. Although I can still copy, remove, edit files freely, decompression always reports errors.
I tried to use Chmod and chown to modify the files and folders of the entire NTFS partition to belong to me with 777 permissions. Although the program prompt was successfully executed, executing the ls-lia command found that the two commands did not work at all.
Using sudo vim/etc/fstab, it is found that the configuration is like this.
UUID=58D03D91D03D767A /mounts/workdisk ntfs defaults,nls=utf8,umask=022,gid=46 0 0
I looked at / etc / group and found that GID = 46 is the plugdev group. And umash is the value subtracted from 777, so permissions are finally programmed to 755.
I made the following modifications:
UUID=58D03D91D03D767A /mounts/workdisk ntfs defaults,nls=utf8,umask=000,uid=1000,gid=1000 0 0
Umash is 000, so the permissions are 777. I looked at the / etc / passwd file and found that my account number is 1000, and my group number is 1000, so I made the above changes.
After restarting the system, all files in NTFS partition belong to me. All permissions are 777. If you decompress the file, you won’t make a mistake.
When mounting hard disk in PS: fstab file, try to use UUID instead of driving file like / dev / sdb4. Because every reboot, the driver updates the hard disk partition corresponding to the file. If you use a format like / dev / sdb4, you may mount incorrect partitions or report errors when you insert a U disk into your computer, move a hard disk, etc. to reboot.
Using the ls-l/dev/disk/by-uuid/command, you can view the UUID corresponding to each partition.