Solution to permissions problems caused by Linux Mount NTFS partitions __linux

Source: Internet
Author: User
Tags uuid
When my Linux auto mount NTFS partition, I always use some file error when I unzip the folder.   I checked the permissions with the Ls-lia command and found that all of the NTFS partitions that were automatically mount were root and belonged to the Plugdev group. Although I can still free copy, remove, edit file, but the decompression is always an error.
I tried to modify the files and folders for the entire NTFS partition using chmod and chown the owner for me, modify permission is 777. Although the program prompts for success, executing the Ls-lia command found that the two commands did not work at all.

Using sudo vim/etc/fstab, the discovery configuration is like this.
Uuid=58d03d91d03d767a/mounts/workdisk NTFS defaults,nls=utf8,umask=022,gid=46 0 0
I checked the/etc/group and found that gid=46 was Plugdev this group. And Umask is a value minus 777, so the permissions are programmed at the end of 755.
I made the following modifications:
Uuid=58d03d91d03d767a/mounts/workdisk NTFS defaults,nls=utf8,umask=000,uid=1000,gid=1000 0 0
The umask are all 000, so the permissions are 777. I checked the/etc/passwd file and found that my account number was 1000 and my group's number was 1000, so I made the change.
After the system is restarted, all files for NTFS partitions are owned by me. The permissions are all 777. Then unzip the file will not be an error.

When you mount a hard drive in a ps:fstab file, use the UUID as much as possible, rather than using a driver file such as/DEV/SDB4. Because, each time the reboot, the driver will update this file corresponding to the hard disk partition. If you use a format such as/DEV/SDB4, insert a U disk on your computer, move the hard drive, and so on to reboot, it is possible to mount the wrong partition, or error.
Using the ls-l/dev/disk/by-uuid/command, you can view the UUID for 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.