When Ubuntu is started, NTFS is automatically mounted to solve the problem that chmod fails to use NTFS. Today, I wrote a program in C language and mounted it to the edisk. When I was about to execute the program, I found that I didn't have the execution permission. Then, the chmod777hello command is used, and no command is successfully executed. Then, the permission to view with ls-l is not changed .. Very depressed .... Through some searches. Think and organize ..
When Ubuntu is started, NTFS is automatically mounted to solve the problem that chmod fails to use NTFS.
Today, I wrote a program in C language and mounted it to disk E. When I was about to execute the program, I found that I didn't have the execution permission.
Then, the chmod 777 hello command is used, and no command is successfully executed. Then, the permission to view with ls-l is not changed .. Very depressed ....
Through some searches. Think and organize .. Solve the problem ..
The solution is as follows:
1. view your own disk analysis information
Uuid ugd gid Information
View the UUID as follows:
Ls-l/dev/disk/by-uuid
Lrwxrwxrwx 1 root 10 January 12 21:45 0001AC6D000973C1->.../sda5
Lrwxrwxrwx 1 root 10 January 12 21:45 0003A300000D437F->.../sda6
Lrwxrwxrwx 1 root 10 January 12 21:45 000ACA5D000CE1C1->.../sda8
Lrwxrwxrwx 1 root 10 January 12 21:45 000E08DD00019CAA->.../sda7
Lrwxrwxrwx 1 root 11 January 12 21:45 158c8fbb-a3d4-4cb9-a7a5-1ecf13586280->.../sda10
Lrwxrwxrwx 1 root 10 January 12 21:45 18354ee2-3c44-405a-af87-7c2316c45983->.../sda1
Lrwxrwxrwx 1 root 10 January 12 21:45 f233ebb4-8c6e-48ca-832c-08ceb567f928->.../sda9
Lrwxrwxrwx 1 root 10 January 12 21:45 FE14E80014E7BA33->.../sda3
Lrwxrwxrwx 1 root 10 January 12 21:45 FE3438FC3438BA0B->.../sda2
Check whether your disk is in sda? You can use sudo fdisk-l to query. I recommend a graphical tool.
You can see at a glance that the GParted Tool
2. Look at GID (group ID) and UID (User ID)
You can view this file
Vim/etc/passwd
2. Modify the/etc/fstab file to enable automatic mounting when the system starts)
Sudo gedit/etc/fstab
Umask is the blocking of permissions. 777-000 is your permission.
Uid and gia are the ID of the user ID group you queried above.
# Windows ntfs software D
UUID = 0001AC6D000973C1/media/SoftWare ntfs defaults, nls = utf8, umask = 000, uid = 1000, gid = 1000 0 0
# Windows ntfs student E
UUID = 0003A300000D437F/media/Student ntfs defaults, nls = utf8, umask = 000, uid = 1000, gid = 1000 0 0
# Windows ntfs Media F
UUID = 000E08DD00019CAA/media/Medai ntfs ults, nls = utf8, umask = 000, uid = 1000, gid = 1000 0 0
# Windows ntfs Else G
UUID = 000ACA5D000CE1C1/media/Else ntfs defaults, nls = utf8, umask = 000, uid = 1000, gid = 1000 0 0
3. Save and restart.