File system data access control method, storage medium and data storage device

By setting access rules in the file system and using the mandatory access control mechanism of the Linux security module, the problem of ransomware and malware attacks faced by backup data is solved, effective access control is achieved, data security is improved and maintained System performance.

CN118690401APending Publication Date: 2024-09-24QNAP SYST INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310478159.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-23
Filing Date
2023-04-28
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively prevent ransomware and malware from attacking backup data, especially when it is difficult to achieve effective access control without affecting system performance.

Method used

By setting access rules in the file system, using the mandatory access control mechanism of the Linux security module, binding the directory and setting the label in the security of the virtual index node, check whether the label is set in the task structure of the process. If If set, modification is allowed, otherwise modification is denied.

Benefits of technology

It effectively prevents ransomware attacks and deletion or modification of malware, improves data security without affecting system performance, and provides a flexible access control mechanism to protect backup data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690401A
    Figure CN118690401A
Patent Text Reader

Abstract

The invention discloses a file system data access control method, a storage medium and a data storage device. The method is applied to a file system of the data storage device and comprises the following steps of: setting an access rule which is bound with a directory in the file system; setting a tag in a security text of a virtual index node of the directory, if a process of an application program wants to modify the directory, checking whether the tag is set in a security text of a task structure of the process, and if the tag is set in the security text of the task structure, allowing the process to modify the directory, otherwise, refusing the process to modify the directory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data access control technology, and in particular to a backup data access control technology. Background Art

[0002] Ransomware and malware are becoming increasingly rampant, and their attacks are happening one after another, causing data or property losses to companies or individuals. In addition to strengthening the information security protection of network devices and servers, we should also pay attention to the security protection of backup data to prevent important backup data from being attacked by ransomware or deleted or modified by malware. Summary of the invention

[0003] To solve the above problems, the present invention provides a file system data access control method, storage medium and data storage device, which can at least partially solve the problems of the prior art.

[0004] The file system data access control method of the present invention is applied to a file system of a data storage device, and the file system data access control method includes: setting an access rule, wherein the access rule is bound to a directory in the file system; setting a label in the security context of the virtual index node of the directory, wherein, if a process of an application program wants to modify the directory, checking whether the label has been set in the security context of the task structure of the process; and if the label has been set in the security context of the task structure, allowing the process to modify the directory, otherwise refusing the process to modify the directory.

[0005] The present invention further provides a computer-readable storage medium storing instructions, which are read by a data storage device to execute the above-mentioned file system data access control method.

[0006] The present invention further provides a data storage device, which is provided with an operating system and a file system, and the operating system is used to execute the above-mentioned file system data access control method in the file system.

[0007] The file system data access control method of the present invention can protect backup data or general data to effectively prevent ransomware attacks and effectively prevent malicious software from being deleted or modified, and improve its security without affecting system performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 FIG. 4 is a schematic diagram of a dentry cache and a virtual index node according to an embodiment of the present invention.

[0009] Figure 2 and Figure 3 It is a schematic diagram of directory entry cache, virtual index node and other related data structures when executing the file system data access control method according to an embodiment of the present invention.

[0010] Figure 4 FIG. 4 is a block diagram of a data storage device according to an embodiment of the present invention.

[0011] Main component symbols

[0012] C1,C2 Directory Entry Cache

[0013] E1-E7 Catalog Items

[0014] F1,F2 file structure

[0015] N1-N5,N7 virtual index nodes

[0016] S3-S5,S7,S8 Security Article

[0017] T1 Mission Structure

[0018] 100 Data storage device

[0019] 110 Operating System

[0020] 120 File System

[0021] 130 Internal memory

[0022] 140 External storage

[0023] 150 MAC module

[0024] 151 Interface module

[0025] 152 Setting Module

[0026] 153 Access the control module. DETAILED DESCRIPTION

[0027] The following describes the implementation of the present invention through specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.

[0028] The technical solution of the present invention can be applied to a Linux operating system installed in a data storage device. The data storage device can be an electronic device such as a computer or a server with data processing and storage functions.

[0029] Linux divides its file system into two layers, namely the virtual file system (VFS) and the physical file system. Linux's virtual file system (hereinafter referred to as the virtual file system) belongs to the core software layer of Linux. It is a software abstraction layer implemented on the physical file system, which is used to accept file system related system calls and forward the system calls to the physical file system. In addition, Linux supports a variety of physical file systems, such as the common ext2, ext3, ext4 and xfs file systems.

[0030] There are two types of index nodes (inodes) in the Linux file system: one is the index node of the virtual file system (referred to as the virtual index node), and the other is the index node of the physical file system (referred to as the physical index node).

[0031] A virtual index node is a data structure that exists only in the dynamic random access memory (DRAM) of the data storage device. Each virtual index node corresponds to or represents a directory, regular file, device file, or other special file in the Linux operating system.

[0032] For a regular directory or file, a virtual index node can be used to store metadata related to the directory or file. In addition, metadata is descriptive data of directory or file attributes, which may include the name, type, modification time of the directory or file, and a pointer to the physical index node of the directory or file.

[0033] The physical file system and the physical directories, physical files and physical index nodes therein are all stored in a non-volatile memory of the data storage device, such as a non-volatile disk, a flash disk or a non-volatile memory.

[0034] The directory entry (dentry) of the virtual file system is another data structure that exists only in the dynamic random access memory of the data storage device. Each directory entry corresponds to or represents a directory in a file path or a file at the end of the file path.

[0035] The Linux operating system sets a directory entry cache (dentry cache) in the dynamic random access memory of the data storage device, which is used to store the path structure of the directory tree in the file system. When the process executed by the data storage device needs to open a file, the directory entries in the directory entry cache can be used to speed up the file query.

[0036] For example, in the file path " / home / hbs / backup1 / dir1 / file1", "home", "hbs", "backup1", "dir1", and "file1" all have corresponding directory entries. When the file " / home / hbs / backup1 / dir1 / file1" is opened for the first time and there is no directory entry for the file path in the directory entry cache, Linux will query the physical file system and then create these directory entries in the directory entry cache in the order of "home", "hbs", "backup1", "dir1", and "file1" for the operation after this opening, and can be used to speed up the search for the same file when it is opened later, because there is no need to query the physical file system again.

[0037] Each directory entry includes the name of the corresponding directory or file, the memory address of the virtual index node of the corresponding directory or file, and a pointer to the directory entry of the directory one level above the directory entry.

[0038] In addition, each directory entry may also include another pointer to link to the directory entry of each subdirectory or file in the directory.

[0039] Figure 1 The present invention is an embodiment of the directory entry cache and virtual index nodes in the dynamic random access memory of the data storage device, wherein five directory entries E1-E5 corresponding to the file path " / home / hbs / backup1 / dir1 / file1" in the directory entry cache C1 and the virtual index nodes N1-N5 of the directories and files corresponding to the directory entries E1-E5 are shown.

[0040] The Linux Security Module (LSM) is a framework in the Linux kernel that supports various computer security models. The Linux Security Module provides the functionality required for mandatory access control (MAC) and provides a mechanism for multiple security checks to run simultaneously in the Linux kernel while minimizing modifications to the Linux kernel.

[0041] The Linux security module provides security context memory blocks for the Linux kernel's task structure and virtual index nodes, so that various security model implementations can store their own information.

[0042] The file system data access control method provided by the present invention is a mandatory access control mechanism running in the Linux kernel implemented by using the framework of the Linux security module. The file system data access control method can be implemented as a software module in the Linux kernel (hereinafter referred to as the mandatory access control module, i.e., the MAC module), and is applicable to various Linux file systems. The technical content of the file system data access control method of the present invention is described in detail below.

[0043] The MAC module of the present invention provides a user mode application programming interface (API) for the process of the application (APP) to send a setting instruction to the MAC module to set access rules when the application (APP) is executed. Each access rule binds an application and a directory in the file system of the data storage device so that the directory and all directories and files under it can only be modified by the process of the application. The above application is stored in the file system of the data storage device in the form of an executable file.

[0044] When an application process sets an access rule through the user mode API of the MAC module to bind the application to a directory, the MAC module selects a unique tag for the access rule, which corresponds to the access rule and only to the access rule.

[0045] In addition, the MAC module sets the label to the security context of the virtual index node of the directory, removes the directory entries of all directories and files under the directory from the directory entry cache, and sets the label to the security context of the virtual index node of the application, and makes the directory entries of the directory and the application resident in the directory entry cache (resident directory entries will not be removed from the directory entry cache).

[0046] When multiple access rules are set for the same application or processes of multiple applications, the MAC module processes each access rule in the above manner, wherein the MAC module selects a unique label for each access rule and ensures that each label corresponds to a different access rule.

[0047] When any application is executed, the instructions in the application are loaded into the dynamic random access memory of the data storage device to generate the process of the application. Linux will set a corresponding task structure for each thread of the process in its kernel to store the execution status of the thread and other related information during execution.

[0048] The MAC module sets all tags in the security context of the application's virtual index node to the security context of each task structure of the application's process.

[0049] When any directory or file is created or opened, Linux creates a directory entry for the directory or file. Whenever a directory entry is created, the security context of the virtual inode pointed to by the directory entry inherits all the labels in the security context of the virtual inode pointed to by the parent directory entry of the directory entry.

[0050] When the security document of a virtual index node of a directory or file has at least one label, and a process generated when an application is executed wants to modify the directory or the file, the MAC module checks whether at least one of the at least one label has been set in the security document of the task structure of the process.

[0051] If the security of the task structure has set at least one of the at least one tags in this document, the MAC module allows the process to modify the directory or the file, otherwise the MAC module denies the process to modify the directory or the file.

[0052] On the other hand, when the security document of the virtual index node of a directory or a file does not have any label, the MAC module allows any process to modify the directory or the file.

[0053] In addition to setting instructions, the application process can also send a release instruction to the MAC module through the user mode API to release the binding of the access rule to the application or directory (ie, release the protection of the access rule).

[0054] When a directory is unbound from an access rule, the MAC module removes the security label of the virtual index node of the directory corresponding to the access rule in this article, and removes all directory entries of the directory tree with the directory as the root node (that is, the directory tree consisting of the directory itself and all directories and files under the directory) from the directory entry cache.

[0055] When a file is unbound from an access rule, the MAC module removes the security label of the virtual index node of the file corresponding to the access rule in this document, and removes the directory entry of the file from the directory entry cache.

[0056] When an application is unbound from an access rule, the MAC module removes the security label of the virtual index node of the application and removes the directory entry of the application from the directory entry cache. After that, Linux will decide whether to remove the directory entry of the application from the directory entry cache according to the directory entry cache algorithm.

[0057] If an application is a data backup program, the backup data obtained at each different time point can be stored in different directory trees. Before each backup, the root directory of the directory tree for this backup is first established, and an access rule is set to bind the application to the root directory, so that the directory tree can be set so that only the process of the application can modify it. Then the process of the application can start to store the backup data in the directory tree.

[0058] Therefore, a directory tree can contain the entire directory structure and file data content of a backup, and different directory trees backed up at different times can be different subtrees in a larger directory tree. The MAC module can select different unique labels for different access rules for each backup, and set the label of each backup to the security context of the virtual index node of the data backup program of the backup, and set the same label to the security context of the virtual index nodes of all directories and files in the directory tree of the backup. Afterwards, the MAC module can perform access control on all directories and files in each directory tree according to the labels of each access rule.

[0059] Figure 2 and Figure 3 The diagram illustrates directory entry cache, virtual index nodes and other related data structures when a file system data access control method is executed according to an embodiment of the present invention.

[0060] In this embodiment, an application (APP) in a file system of the data storage device is a data backup program, and its executable file is " / home / hbs / bin / hbs", corresponding to the directory entries E1, E2, E6 and E7 in the directory entry cache C2. The data backup program will perform the latest backup, and it is predetermined that the latest backup data will be stored in the directory " / home / hbs / backup1" (corresponding to the directory entries E1-E3 in the directory entry cache C2). The flow of the file system data access control method of this embodiment is described in detail below.

[0061] First, the process of the data backup program sends a setting instruction through the user mode API of the MAC module to set a binding directory " / home / hbs / backup1" and the access rules of the data backup program, so that the directory " / home / hbs / backup1" can only be modified by the process of the data backup program.

[0062] After receiving the setting instruction, the MAC module opens the directory " / home / hbs / backup1". In the Linux operating system, each time a directory or file is opened, a corresponding data structure (hereinafter referred to as a file structure) is set in the Linux kernel to store relevant information after the directory or file is opened, such as the memory address of the directory entry of the directory or file.

[0063] The file structure after the directory " / home / hbs / backup1" is opened is F1. Therefore, the MAC module can find the directory entry E3 of the directory " / home / hbs / backup1" and its virtual index node N3 through the file structure F1, select a unique label LA for the access rule, and then set the label LA to the security of the virtual index node N3 in S3, as shown in this article. Figure 2 shown.

[0064] MAC will set the directory entry E3 to be resident in the directory entry cache C2. The resident directory entry will never be removed from the directory entry cache, and the virtual index node it points to will also be stored in the memory unless the directory or file corresponding to the directory entry is deleted.

[0065] In addition, the MAC module removes the directory entries of all directories and files under the directory " / home / hbs / backup1" from the directory entry cache C2. In this way, when the directories and files under the directory " / home / hbs / backup1" are accessed, the label LA can be inherited to the security context of the virtual index nodes of these directories and files.

[0066] Next, the MAC module starts the data backup program, that is, opens the executable file " / home / hbs / bin / hbs", and finds the directory entry E7 of the executable file and its virtual index node N7 through the file structure F2 of the executable file, and then sets the label LA to the security of the virtual index node N7 in S7, as shown in FIG. Figure 2 shown.

[0067] In addition, the MAC module will set the directory entry E7 to reside in the directory entry cache C2, and the virtual index node N7 will also reside in the memory.

[0068] Then, the executable file " / home / hbs / bin / hbs" is executed, and the MAC module sets the label LA in the security document S7 of its virtual index node N7 to the security document S8 of the task structure T1 stored in the Linux kernel corresponding to the process derived from the executable file, as shown in Figure 2 shown.

[0069] Each virtual index node and its security context are stored at different memory addresses, and each virtual index node includes a pointer to the security context of the virtual index node. In addition, each task structure and its security context are also stored at different memory addresses, and each task structure includes a pointer to the security context of the task structure.

[0070] Next, the data backup program process creates the directory " / home / hbs / backup1 / dir1". Because the security of the task structure T1 of the data backup program process S8 also has the label LA, the MAC module allows the data backup program process to create the directory "dir1". The virtual file system will generate a virtual index node N4 and a directory entry E4 for the directory "dir1".

[0071] In addition, the MAC module obtains the label LA in the security context S3 of the virtual index node N3 from the parent directory entry E3 of the directory entry E4, and sets the label LA in the security context S4 of the virtual index node N4.

[0072] Next, the data backup program process creates a file "file1" in the directory "dir1". Because the security document S4 of the virtual index node N4 of the directory "dir1" has a label LA, and the security document S8 of the task structure T1 also has a label LA, the MAC module allows the data backup program process to create a file "file1" in the directory "dir1". The virtual file system will generate a virtual index node N5 and a directory entry E5 for the file "file1".

[0073] In addition, the MAC module obtains the label LA in the security document S4 of the virtual index node N4 from the parent directory entry E4 of the directory entry E5, and sets the label LA to the security document S5 of the virtual index node N5, such as Figure 3 shown.

[0074] At this point, only the data backup program with label LA set can modify the directory " / home / hbs / backup1" and the directories and files under it that have also been labeled LA set. Other applications cannot modify the directory " / home / hbs / backup1" or the directories or files under it because they do not have label LA set.

[0075] Directory entries E4 and E5 are not forced to reside in the directory entry cache C2, so when the Linux operating system needs memory, directory entries E4 and E5 may be cleared to release memory. Later, when another application process accesses this path (" / home / hbs / backup1 / dir1 / file1"), directory entries E4 and E5 of directory "dir1" and file "file1" will be created in sequence and inherit the security label LA in S3 of the virtual index node N3 pointed to by directory entry E3.

[0076] In the aforementioned embodiments, the file system data access control method of the present invention is applied to the Linux operating system, but the present invention is not limited thereto. In another embodiment, any file system having Figure 3 The various data structures shown and the operating systems with corresponding mechanisms can all adopt the file system data access control method of the present invention.

[0077] In one embodiment, the present invention further provides a computer-readable storage medium, such as a memory, a disk or an optical disk, which can be used to store instructions, and the instructions can be read by the aforementioned data storage device to execute the aforementioned file system data access control method.

[0078] Figure 4 The block diagram of the data storage device 100 of one embodiment of the present invention. The data storage device 100 of this embodiment includes an operating system 110, a file system 120, an internal memory 130, an external memory 140, and a MAC module 150. The operating system 110 may be, for example, a Linux operating system, and the file system 120 may include the aforementioned physical file system and virtual file system. Both the operating system 110 and the file system 120 may be implemented as software or firmware. The internal memory 130 may be, for example, a dynamic random access memory, which is used to store data structures such as virtual index nodes, directory entries, directory entry caches, task structures, file structures, and security documents in the above-mentioned embodiments. The external memory 140 may be the above-mentioned non-volatile memory, which is used to store physical directories, physical files, and physical index nodes in the above-mentioned physical file system. The MAC module 150 is used to execute the file system data access control method in the above-mentioned embodiments.

[0079] Any two blocks among the operating system 110, the file system 120, the internal memory 130, and the MAC module 150 are connected to each other in communication, and the external memory 140 is connected to the operating system 110, the file system 120, and the internal memory 130 in communication. Figure 4 The diagram is shown in the figure to simplify the drawing.

[0080] Figure 4The MAC module 150 in the embodiment is illustrated as a module independent of the operating system 110, but the present invention is not limited thereto. In another embodiment, the MAC module may be implemented as a software module in the kernel of the operating system 110.

[0081] The MAC module 150 includes an interface module 151, a setting module 152, and an access control module 153, wherein the interface module 151 and the setting module 152 are in communication with each other. The interface module 151, the setting module 152, and the access control module 153 can all be implemented as software, firmware, or hardware. If implemented as hardware, they can be a processing unit or logic unit with a program instruction execution function.

[0082] The interface module 151 may provide a user mode API to receive the setting instructions and the release instructions in the above-mentioned embodiments.

[0083] The setting module 152 can be used to execute various setting procedures in the above-mentioned embodiments, for example: selecting a unique label for each access rule and setting the label to the security context of the corresponding virtual index node; whenever a directory entry is created, making the security context of the virtual index node pointed to by the directory entry inherit all labels in the security context of the virtual index node pointed to by the parent directory entry of the directory entry; setting all labels in the security context of the virtual index node of the application that has just been executed to the security context of each task structure of the process of the application; removing the label corresponding to an access rule from the security context of the virtual index node; making the directory entry reside in the directory entry cache; releasing the directory entry from the directory entry cache; and removing the directory entry from the directory entry cache, etc.

[0084] When an application process wants to modify a directory or a file, the access control module 153 may check the security document of the task structure of the process and the label in the security document of the virtual index node of the directory or the file to allow or deny the process to modify the directory or the file.

[0085] As mentioned above, the file system data access control method of the present invention is implemented in the operating system core. Through the user mode API, the backup application can flexibly set the backup data to be protected and can flexibly adjust the protection range to prevent the backup data from being attacked by ransomware or prevent malware from deleting or modifying the backup data.

[0086] In addition, through the user mode API, the backup application can also be timely unprotected in response to management needs. In addition, the access rules of the present invention are applied to the security of the virtual index node in the dynamic random access memory, and will not be stored in the physical index node, occupying physical storage space or affecting system performance.

[0087] Furthermore, compared with various prior arts, the present invention has the following advantages:

[0088] First, the existing file system's write once read many (WORM) protection mechanism can be used to protect backup data, because once the protected target is written, it becomes read-only, so it can prevent deletion and tampering. However, some file systems do not have this function, so WORM cannot be used to protect backup data. In addition, WORM usually requires a retention period to be set, and before the retention period expires, the data is not allowed to be changed. This limits the flexibility of backup. Once the backup policy changes, the backup data that does not comply with the policy will not be deleted in time. In addition, there may be an unprotected window after the backup is completed and before WORM is started, and the backup data may be attacked during this window.

[0089] In contrast, the technical solution of the present invention is applicable to any file system, can protect backup data in various file systems, and does not need to set a preservation period, and does not limit the flexibility of backup. In addition, the present invention can set access rules before backup, and there is no unprotected window of WORM.

[0090] Second, the existing operating system's discretionary access control (DAC) mechanism may cause backup files to be accidentally accessed by other software because the backup application or system administrator may set insecure read and write permissions. In addition, since the root user (ROOT) has the highest permissions, if a program runs with root user permissions, or improperly elevates permissions due to information security vulnerabilities, it can bypass DAC and access backup data at will. Therefore, DAC cannot achieve effective access control.

[0091] In contrast, the present invention performs access control through a unique label selected and set by the MAC module, and there will be no accidental setting of incorrect read and write permissions. Regardless of the user identity or permissions of the program, even a program running as a root user cannot circumvent the label check of the MAC module of the present invention, thereby achieving effective access control.

[0092] Third, due to the above problems, the existing Linux operating system provides two MAC mechanisms, AppArmor and Security-Enhanced Linux (SELinux), to make up for the shortcomings of DAC. Among them, AppArmor limits the program path to control the resources and files that the program can access, but programs that have no access rules set are not controlled by AppArmor. Since ransomware may be a file under any path in the file system and may have any file name, ransomware can easily circumvent AppArmor's control. Furthermore, AppArmor limits the program path, and can easily use the Linux operating system's symbolic link (symbolic link) or bind setting (bind mount) to circumvent AppArmor's control.

[0093] In contrast, the present invention binds the label of the access rule to the virtual index node to perform access control, rather than deciding whether to apply the access rule based on the program path or name. Therefore, all programs that do not have the label cannot modify the directory or file protected by the label, regardless of the path or file name. Even if the symbolic link or binding setting of the Linux operating system is used, the access control of the present invention cannot be circumvented.

[0094] Fourth, SELinux controls programs, and any data access is denied to programs that do not have access rules set. Such high-level security control often causes program access to be accidentally denied, causing management problems, so system administrators often turn off this function, making it useless.

[0095] In contrast, the present invention will not deny any data access by programs without set access rules, but only deny the access of programs without set access rules to directories or files with set access rules, so the access of programs will not be accidentally denied to cause management troubles.

[0096] In addition to being applied to backup applications to protect backup data, the technical solution of the present invention can also be applied to other types of programs or software to control access to general data.

[0097] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Any person skilled in the art may modify and alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be as set forth in the claims.

Claims

1. A file system data access control method, applied to a file system of a data storage device, the file system data access control method comprising: Setting an access rule, wherein the access rule is bound to a first directory in the file system; Setting a label in a security context of the virtual index node of the first directory; If a first process of a first application program intends to modify the first directory, checking whether the security tag of the task structure of the first process has been set in this document; and If the security of the task structure has set the tag in this document, the first process is allowed to modify the first directory. If not, the first process is denied to modify the first directory.

2. The file system data access control method according to claim 1, wherein: The method further includes: remove directory entries of all directories and files under the first directory from a directory entry cache of an operating system of the data storage device; and The directory entry of the first directory is made to reside in the directory entry cache.

3. The file system data access control method according to claim 1, wherein: The method further includes: The security label of the virtual index node of the first directory is removed, and all directory entries of the directory tree with the first directory as the root node are removed from the directory entry cache of the operating system of the data storage device to release the binding of the access rule to the first directory.

4. The file system data access control method according to claim 1, wherein: The method further includes: When a second directory or file is created or opened under the first directory, the tag is set to the security context of the virtual index node of the second directory or the file; If a second process of a second application program intends to modify the second directory or the file, checking whether the security tag in the task structure of the second process has been set; and If the security of the task structure of the second process has set the label in this article, the second process is allowed to modify the second directory or the file, otherwise the second process is denied to modify the second directory or the file.

5. The file system data access control method according to claim 1, wherein: If the security of the task structure of the first process has set the label herein, the access rule binds the first application and the first directory, and the file system data access control method further includes: Allowing the directory entries of the first directory and the first application to reside in a directory entry cache of an operating system of the data storage device; Setting the tag in the security context of the virtual index node of the first application; and When the first application is executed, the label in the security document of the virtual index node of the first application is set to the security document of the task structure of the first process.

6. The file system data access control method according to claim 5, wherein: The method further includes: The security tag of the virtual index node of the first application is removed, and the directory entry of the first application is released from the directory entry cache to release the binding of the access rule to the first application.

7. The file system data access control method according to claim 1, wherein: The method further includes: Setting a plurality of access rules, wherein each of the access rules is bound to a directory or a file in the file system; Selecting a label for each access rule, and then setting the label to the security of the virtual index node of the directory or the file to which the access rule is bound, wherein the label of each access rule is different; If a third process of a third application intends to modify one of the directories and the files, checking whether at least one of the tags has been set in the security of the task structure of the third process; and If the security of the task structure of the third process has set at least one of the tags herein, the third process is allowed to modify the directory or the file; otherwise, the third process is denied to modify the directory or the file.

8. The file system data access control method according to claim 7, wherein: Each of the access rules binds a backup application in the file system and one of the directories; Each of these directories is the root directory of a different directory tree; The backup application bound to each access rule uses the directory tree of the directory bound to the access rule to store the backup data of the backup application; as well as Each of the directory trees is used to store backup data at different time points, and the file system data access control method also includes: Setting the label of each access rule to the security context of the virtual index node of the backup application to which the access rule is bound, and to the security context of the virtual index nodes of all directories and files in the directory tree to which the access rule corresponds; and Access control of all directories and files in each directory tree is performed according to the labels of each access rule.

9. A computer-readable storage medium storing instructions, wherein the instructions are read by a data storage device to execute the file system data access control method according to any one of claims 1 to 8.

10. A data storage device comprising an operating system and a file system, wherein the operating system is used to execute the file system data access control method as claimed in any one of claims 1 to 8 in the file system.