Solution to permission problems caused by Linux Mount NTFS partition

Source: Internet
Author: User
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.



 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.