Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the permission problem caused by Mount NTFS Partition in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to solve the permission problem caused by Mount NTFS partition in Linux, which is very detailed and has certain reference value. Friends who are interested must finish it!

When my Linux automatically partitions mount NTFS, I always report an error with some files when I extract the folder. I checked the permissions with the ls-lia command and found that the owner of the NTFS partition for automatic mount is root, which belongs to the plugdev group. Although I can still free copy, remove, and edit files, the decompression always reports an error.

I tried to use chmod and chown to change the ownership of the files and folders in the entire NTFS partition to me with a permission of 777. Although the program prompt execution was successful, executing the ls-lia command found that the two commands didn't work at all.

Using sudo vim / etc/fstab, the configuration is found to be 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 group plugdev. And umask is the value of 777 minus, so the permissions are finally programmed to be 755.

I made the following changes:

UUID=58D03D91D03D767A / mounts/workdisk ntfs defaults,nls=utf8,umask=000,uid=1000,gid=1000 00

Umask are all 000, so permissions are all 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 restarting the system, I am the owner of all files in the NTFS partition. Permissions are all 777. If you decompress the file again, you won't get it wrong.

When you use mount hard drives in PS:fstab files, try to use UUID instead of driver files such as / dev/sdb4. Because every time you restart, the driver will update the hard disk partition corresponding to this file. If you use the / dev/sdb4 format, it is possible to mount the wrong partition or report an error when you insert a flash drive, removable hard drive, etc., on your computer.

Using the ls-l / dev/disk/by-uuid/ command, you can view the uuid for each partition.

These are all the contents of this article entitled "how to solve the permission problems caused by Mount NTFS partitioning in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report