File system and file access control method
By creating a file index node structure with a self-destruct flag and permission data block pointer for the file system, the problems of file access timeliness and automatic destruction are solved, and precise control of file access and improved system security are achieved.
Patent Information
- Application Number
- CN202510842857.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-03
AI Technical Summary
The existing file system cannot effectively control the access timeliness and automatic destruction of confidential files, resulting in insufficient security and controllability. Modifying the LSM security domain will cause kernel module incompatibility.
By creating a file index node structure for each file, including a self-destruction flag, maximum authorization period, and permission data block pointer, precise control and automatic destruction of access rights are achieved. Combined with dual-period verification and scheduled cleanup mechanisms, the timeliness and security of file access are ensured.
It achieves precise control over file access and automatic destruction, improves the security, controllability and compatibility of the system, and is suitable for timeliness management and fine-grained access control of sensitive files.
Smart Images

Figure CN120744972A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of file systems, and in particular to a file system and a file access control method. Background Art
[0002] In the file system, some highly confidential files are usually stored. Because of their confidentiality, these files often have a time limit. The access rights granted to users should also be time-limited. After a certain period of time, the access rights need to be revoked. When all permissions expire, the files should be destroyed by themselves.
[0003] Current file systems typically control file access through DAC (Discretionary Access Control) or MAC (Mandatory Access Control) mechanisms. The DAC mechanism only provides three control bits to restrict access rights: the owner, the group to which it belongs, and other users. This means the DAC mechanism can only control whether the file's owner, group, and other users can access the file, but it cannot control the time limit for users to access the file, nor can it automatically destroy the file when the access rights expire. While the MAC mechanism can control the access rights of different roles to files (such as read, write, and execute), it also cannot control the time limit for different roles' access, nor can it automatically destroy files.
[0004] Prior art also offers a method for implementing file access control by modifying the Linux Security Module (LSM) security domain. The security domain field stores security information about key kernel data structures and is crucial for implementing the security mechanisms of most access control policies. However, modifying the LSM security domain results in coupling with the existing LSM framework, making multiple kernel security modules incompatible with each other. Only one can be enabled, requiring the other modules to be disabled when enabling file-specific functions, a significant trade-off. Summary of the Invention
[0005] In view of this, the present application proposes a file system and file access control method, device, and storage medium that can accurately control the access rights and access cycle of files and provide self-destruction properties to meet the storage requirements of confidential files.
[0006] In a first aspect, the present application provides a file system, including:
[0007] A creation module is configured to create a file index node structure for each file. The file index node structure includes a self-destruct flag, a maximum authorization period, and a permission data block pointer. The permission data block pointer is configured to point to a permission data block. The permission data block contains and stores an access permission structure for at least one user. The access permission structure includes a user group ID, usage rights, and an authorized usage period.
[0008] The access control module is used to control the access of users according to the file index node structure and access permission structure of the file when the user accesses the file;
[0009] The self-destruct module is used to self-destruct files whose maximum authorization period has expired and whose self-destruct flag is enabled.
[0010] From the above, the present application provides a file system, which creates a file index node structure for each file that includes a self-destruct flag, a maximum authorization period, and a permission data block pointer, wherein the permission data block pointer is used to point to a permission data block that stores multiple access permission structures, and the access permission structure includes a user group ID (identifying the group to which the user belongs), usage permissions (such as read, write, execute, and other operation permissions), and an authorized usage period (determining the time range within which the user can access the file). Based on the file index node structure and the access permission structure, when a user tries to access a file, the system will control the user's access according to the file index node structure and the access permission structure of the file. At the same time, the system can also self-destruct files whose maximum authorization period has expired and whose self-destruct flag is enabled, thereby achieving flexible management and precise control of access permissions and access cycles. The present application can achieve fine-grained time-sharing permission control and automatic destruction mechanism while maintaining file system compatibility, effectively solving the core security issues of life cycle management of sensitive files.
[0011] Optionally, the maximum authorization period in the file index node structure is the maximum value of the authorized usage periods in all access permission structures of the file stored in the permission data block.
[0012] From the above, by dynamically maintaining the maximum authorization period of the file in the file index node structure, the value of the maximum authorization period is the maximum value of the authorized usage period in all access permission structures, so that the system can quickly determine the overall validity of the file permissions by accessing the maximum authorization period, thereby optimizing the verification process of file access permissions and improving system performance and response speed.
[0013] Optionally, the execution logic of the access control module for performing access control on users includes:
[0014] When a user accesses a file, it is determined whether the maximum authorization period of the file has expired based on the creation time of the file and the maximum authorization period in the file index node structure;
[0015] If it has not expired, the user's access permission structure is indexed according to the permission data block pointer in the file index node structure, and the user's authorized use period for the file is determined according to the access permission structure. If it has not expired, the user is granted permission to use the file;
[0016] If the maximum authorization period expires, the self-destruction function of the self-destruction module is triggered.
[0017] From the above, when controlling user access, expired files are first quickly filtered through the maximum authorization period in the file index node structure, and user-level permission verification is further performed only when the maximum authorization period of the file has not expired, thereby optimizing the verification process of user access control. This application prevents permission abuse or expired access through double period verification, and combines the self-destruction mechanism to form a closed-loop file security management process.
[0018] Optionally, the self-destruct module is further used to:
[0019] Regularly or periodically determine whether the maximum authorization period of each file has expired based on the creation time of each file and the maximum authorization period in the file index node structure, and self-destruct the files whose maximum authorization period has expired and whose self-destruction flag is enabled.
[0020] As described above, by actively scanning and cleaning expired files on a scheduled or periodic basis, the destruction process is no longer solely dependent on user access behavior. Even if a file has never been accessed, it can be cleared in a timely manner as long as its validity period has expired. This significantly enhances the file system's active security protection capabilities and enables the system to comprehensively and automatically manage the file life cycle.
[0021] Optionally, the execution logic of the self-destruction module for self-destructing the file includes:
[0022] Fill the file content of the file with a random value and delete the file entry from the file directory structure to which the file belongs.
[0023] As mentioned above, before deleting a file, the system will overwrite the original file content with random data (such as random bytes). This operation can prevent the residual data of the file from being read by disk recovery tools, thereby effectively protecting confidential information from being illegally recovered. The file is then deleted from the file directory structure to which it belongs, that is, the reference to the file is removed from the directory item, so that the operating system can no longer access the file through the path, thus forming a closed-loop security destruction process, which not only prevents data leakage but also improves the overall security and controllability of the system.
[0024] Optionally, the creation module is further configured to create at least one file directory structure, wherein the file directory structure includes index node pointers of all files under the file directory;
[0025] When a user accesses the file directory, the file index node structure corresponding to each file is traversed according to the index node pointers of all files to verify the maximum authorization period of each file and the user's authorized usage period and usage rights.
[0026] As mentioned above, by creating a file directory structure and adding index node pointers to all files under the file directory, when a user opens or reads a file directory, the system will traverse the file index node structure corresponding to each file based on these pointers to check the maximum authorization period of each file and the user's authorized usage period and usage permissions, thereby enabling the file system to have full-process access control capabilities from the directory level to the file level.
[0027] Optionally, the file index node structure further includes a general index node, which stores the creation time of the file.
[0028] As described above, the file index node structure includes a standard universal index node, which stores the creation time of the file, so that the file index node structure can be compatible with the existing file system, ensuring the compatibility and portability of the file system.
[0029] In a second aspect, the present application provides a file access control method, which is applied to the above-mentioned file system, comprising:
[0030] In response to the permission addition request, the newly created access permission structure is written into the permission data block, and the maximum authorization period in the file index node structure is updated according to the authorized usage period in the access permission structure;
[0031] In response to a user's request to access a file, determine whether the maximum authorization period of the file has expired based on the file index node structure of the file; if not, determine whether the user's authorized use period of the file has expired based on the user's access permission structure; and grant the user permission to use the file if it has not expired;
[0032] If the maximum authorization period of the file expires and the self-destruction flag is enabled, the file will be self-destructed.
[0033] Optionally, updating the maximum authorization period in the file index node structure according to the authorized usage period in the access permission structure includes:
[0034] The authorized usage period in the newly created access permission structure is compared with the maximum authorized usage period in the file index node structure. When the authorized usage period is greater than the maximum authorized usage period, the authorized usage period is updated to the maximum authorized usage period.
[0035] As described above, the file access control method provided by this application combines a time-based permission control mechanism with an automated self-destruction function to build a closed-loop security management system. This not only achieves precise control over file access, but also enhances the system's security, controllability, and scalability through dynamic updates of the maximum authorization period, dual time validity verification, and scheduled cleanup. This makes the method particularly suitable for scenarios requiring time-sensitive management and fine-grained access control of sensitive files.
[0036] In a third aspect, the present application provides a computing device, comprising:
[0037] processor;
[0038] a memory for storing one or more programs;
[0039] When the one or more programs are executed by the processor, the processor implements the above-mentioned file access control method.
[0040] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned file access control method when executed by a computer.
[0041] These and other aspects of the present application will become more apparent from the following description of the embodiment(s). BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 An architectural diagram of a file system provided in an embodiment of the present application;
[0043] Figure 2 A flowchart of a user accessing a file directory provided in an embodiment of the present application;
[0044] Figure 3 A flowchart of a file access control method provided in an embodiment of the present application;
[0045] Figure 4 A structural diagram of a computing device provided in an embodiment of the present application.
[0046] It should be understood that the sizes and shapes of the blocks in the above structural diagrams are for reference only and should not constitute an exclusive interpretation of the embodiments of this application. The relative positions and inclusion relationships between the blocks presented in the structural diagrams are only schematic representations of the structural relationships between the blocks, and do not limit the physical connection methods of the embodiments of this application. DETAILED DESCRIPTION
[0047] The technical solution provided by this application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of this application are mainly for illustrating possible implementation methods of the technical solution of this application and should not be interpreted as the sole limitation of the technical solution of this application. It is known to those skilled in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by this application is also applicable to similar technical problems.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art in the art of this application. In the event of any inconsistency, the meaning described in this specification or the meaning derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit this application.
[0049] The embodiments of the present application propose a file system and file access control method that supports multi-user and time-sharing access (different users have different access time ranges), can accurately control the access rights and access cycles of files, and provides self-destruction properties to meet the storage requirements of confidential files.
[0050] Figure 1 The file system shown in the embodiment of the present application is a file system, which can be an independent file system or a new file system obtained by improving the standard file system. Figure 1 As shown, the file system includes a creation module 110 , an access control module 120 and a self-destruction module 130 .
[0051] Among them, the creation module 110 is used to create a file index node structure for each file, and the file index node structure includes a self-destruction flag, a maximum authorization period and a permission data block pointer, and the permission data block pointer is used to point to a permission data block, in which an access permission structure of at least one user is constructed and stored, and the access permission structure includes a user group ID, usage rights and authorized usage period; the access control module 120 is used to control user access according to the file index node structure and access permission structure of the file when the user accesses the file; the self-destruction module 130 is used to self-destruct files whose maximum authorization period has expired and the self-destruction flag is enabled.
[0052] In some embodiments, the file system of the present application includes both the universal index structure structinode of the standard file system and the file index node structure sec_fs_inode created by the creation module. The universal index structure includes: the universal index node i_inode and other standard fields (such as permission bits, size, etc.). The universal index node i_inode includes the file creation time i_ctime. The file index node structure sec_fs_inode of the present application can be expanded on the basis of the existing universal index structure and inherit the universal index nodes in the existing universal index structure, so that the expanded file index node structure can be compatible with the existing file system. The file index node structure sec_fs_inode includes: the universal index node i_inode (including the creation time i_ctime, etc.), the self-destruction flag auto_destroy, the maximum authorization period max_avail_time, and the permission data block pointer secu_access_block.
[0053] In some embodiments, the file index node structure sec_fs_inode of the present application can retain its original function by inheriting the general index node i_inode of the standard file system, while being compatible with the existing standard file system. The self-destruct flag auto_destroy can be a Boolean value (true indicates that self-destruction is enabled), which is used to determine whether to automatically destroy the file when the maximum authorization period max_avail_time expires. The maximum authorization period max_avail_time is the maximum value among the authorized use periods of all access rights structures, and is dynamically updated as the authorized use periods in the access rights structure change, so that the system can quickly determine the overall validity of the file permissions by accessing the maximum authorization period. The maximum authorization period and the authorized use period are both relative time (units can be days), representing the effective duration starting from the file creation time i_ctime, with the expiration time = i_ctime + max_avail_time. The permission data block pointer secu_access_block stores an offset for pointing to a permission data block on the disk, which stores several access rights structures sec_fs_permission.
[0054] In some embodiments, since traditional file systems usually have only three control bits (owner, group, and other users), it is impossible to effectively control the user's access time or implement an automatic destruction function. The present application expands on the traditional file system by adding a permission data block. The permission data block usually has 1024 bytes, of which the first 8 bytes are used to represent a quick index. Each bit can represent the existence of a permission by 0 or 1. The subsequent space is used to sequentially store multiple access permission structures sec_fs_permission. When accessing the permission data block, it is possible to quickly determine whether a user group has a corresponding permission record by quickly indexing a specific bit in the 8 bytes, avoiding traversing the entire permission data block to search for the permission information of a specific user. The access permission structure sec_fs_permission includes: user group ID g_id (used to identify the authorized user group), usage rights secu_access (read, write, execute, etc.), and authorized use period avail_time (relative time). The expiration time of the authorized use period = i_ctime + avail_time.
[0055] In some embodiments, when a user accesses a file, the access control module 120 first determines whether the maximum authorization period (max_avail_time) of the file has expired based on the file's creation time (i_ctime) and the maximum authorization period (max_avail_time) in the file index node structure (sec_fs_inode). If not, the access control module 120 indexes the user's access permission structure (sec_fs_permission) based on the permission data block pointer (secu_access_block) in the file index node structure (sec_fs_inode). Furthermore, the module determines whether the user's authorized use period (avail_time) of the file has expired based on the file's creation time (i_ctime) and the access permission structure (ec_fs_permission). If not, the module grants the user the use permission (secu_access) in the access permission structure (ec_fs_permission). If the maximum authorization period (max_avail_time) has expired, the module triggers the self-destruction function of the self-destruction module. This application prevents abuse of permissions or expired access through dual-period verification, and combines the self-destruction mechanism to form a closed-loop file security management process.
[0056] In some embodiments, before the self-destruction module self-destructs a file, it is necessary to determine whether the maximum authorization period max_avail_time of the file has expired and whether the self-destruction flag auto_destroy is enabled. If the maximum authorization period max_avail_time has expired and the self-destruction flag auto_destroy is enabled, the file content of the file can be filled with a random value, and the file item can be deleted from the file directory structure to which the file belongs, that is, the reference to the file is removed from the directory item, so that the operating system can no longer access the file through the path, thereby forming a closed-loop security destruction process, which not only prevents data leakage but also improves the overall security and controllability of the system.
[0057] In some embodiments, the self-destruct module can also determine whether the maximum authorization period max_avail_time of each file has expired based on the creation time i_ctime of each file and the maximum authorization period max_avail_time in the file index node structure sec_fs_inode on a regular or periodic basis, and self-destruct the files whose maximum authorization period max_avail_time has expired and whose self-destruct flag auto_destroy is enabled, so as to enhance the active security protection capability of the file system and enable the system to comprehensively and automatically manage the life cycle of files.
[0058] In some embodiments, the file system of the present application also has several file directory structures, each file directory structure stores multiple files, and the file directory structure can be created by the creation module. The directory information of the file directory structure is newly added with an index node pointer corresponding to all files under the file directory. The file index node structure sec_fs_inode of all files under the file directory can be quickly traversed through the index node pointer to quickly check the term and permissions of each file under the file directory, including: whether the file has exceeded the maximum authorization period; whether the group to which the user belongs is within the scope of permitted access; and whether the user's authorized use period for the file has expired. The file directory structure dir includes: sec_fs_inode index node pointer, file name length file_name_len, and file name file_name. Reference Figure 3As shown, when user A opens or reads a file directory, the system first traverses the file index node structure sec_fs_inode corresponding to each file according to the index node pointer sec_fs_inode of all files in the file directory, and determines whether each file is expired according to the maximum authorization period max_avail_time in the file index node structure sec_fs_inode. If expired, the self-destruction process is triggered. If not expired, the user A's access permission structure ec_fs_permission for each file is accessed according to the permission data block pointer secu_access_block in each file index node structure sec_fs_inode to determine whether the authorized use period avail_time of each file by user A has expired and which use permissions secu_access he has. For example, the access permission structure corresponding to Block12 file is accessed according to the secu_access_block=Block12 pointer. According to the access permission structure, user A has the permission to use the Block12 file, which is neither read nor write. According to the secu_access_block=Block23 pointer, the access permission structure corresponding to the Block23 file is accessed. According to the access permission structure, user A has the permission to use the Block23 file, which is read but not write. According to the secu_access_block=Block34 pointer, the access permission structure corresponding to the Block34 file is accessed. According to the access permission structure, user A has the permission to use the Block34 file, which is read and write. By quickly traversing the file index node structure sec_fs_inode and the access permission structure ec_fs_permission corresponding to each file through the index node pointer sec_fs_inode of all files under the file directory, the user's permission to use each file under the file directory can be quickly obtained and returned to the user, thereby achieving fast directory-level access and improving the response speed of the file system.
[0059] It should be understood that the systems and modules in the embodiments of the present application can be implemented by software, for example, they can be implemented by computer programs or instructions having the above functions, and the corresponding computer programs or instructions can be stored in the memory inside the terminal, and the processor reads the corresponding computer programs or instructions in the memory to implement the above functions. Alternatively, the systems or modules in the embodiments of the present application can also be implemented by hardware. Alternatively, the systems or modules in the embodiments of the present application can also be implemented by a combination of a processor and a software module.
[0060] based on Figure 1-Figure 2 The present application also provides a file access control method, referring to the file system shown in FIG. Figure 3 As shown, the method includes:
[0061] S210: In response to the permission addition request, the newly created access permission structure is written into the permission data block, and the maximum authorization period in the file index node structure is updated according to the authorized usage period in the access permission structure;
[0062] S220: In response to a user's request to access a file, determining whether a maximum authorization period for the file has expired based on the file index node structure of the file;
[0063] S230: If it has not expired, determining whether the authorized use period of the file by the user has expired according to the access permission structure of the user, and granting the user the permission to use the file if it has not expired;
[0064] S240: If the maximum authorization period of the file expires and the self-destruction flag is enabled, the file is self-destructed.
[0065] In some embodiments, updating the maximum authorization period in the file index node structure according to the authorized usage period in the access permission structure includes:
[0066] The authorized usage period in the newly created access permission structure is compared with the maximum authorized usage period in the file index node structure. When the authorized usage period is greater than the maximum authorized usage period, the authorized usage period is updated to the maximum authorized usage period.
[0067] It should be noted that the details of the method processing in the embodiment of the present application can be referred to Figure 1-Figure 2 The related descriptions of the illustrated embodiment and related extended embodiments will not be repeated in the embodiments of this application.
[0068] In summary, the present application provides a file system and file access control method, which creates a file index node structure for each file that includes a self-destruct flag, a maximum authorization period, and a permission data block pointer, wherein the permission data block pointer is used to point to a permission data block that stores multiple access rights structures, the access rights structure including a user group ID (identifying the group to which the user belongs), usage permissions (such as read, write, execute, and other operation permissions), and an authorized usage period (determining the time range in which the user can access the file). Based on the file index node structure and the access rights structure, when a user attempts to access a file, the system will perform access control on the user according to the file index node structure and the access rights structure of the file. At the same time, the system can also self-destruct files whose maximum authorization period has expired and whose self-destruct flag is enabled, thereby achieving flexible management and precise control of access rights and access cycles. The present application embodiment can achieve fine-grained time-sharing permission control and automatic destruction mechanism while maintaining file system compatibility, not only achieving precise control of file access, but also improving the security, controllability, and scalability of the system through dynamic updating of the maximum authorization period, double time verification, and timed cleanup, making the method particularly suitable for scenarios where time management and fine-grained access control of sensitive files are required.
[0069] Figure 4 10 is a structural diagram of a computing device 1000 provided in an embodiment of the present application. The computing device 1000 includes: a processor 1010, a memory 1020, a communication interface 1030, and a bus 1040.
[0070] It should be understood that Figure 4 The communication interface 1030 in the computing device 1000 shown can be used to communicate with other devices.
[0071] The processor 1010 may be connected to a memory 1020. The memory 1020 may be used to store the program code and data. Therefore, the memory 1020 may be a storage unit within the processor 1010, an external storage unit independent of the processor 1010, or a component including both a storage unit within the processor 1010 and an external storage unit independent of the processor 1010.
[0072] Optionally, the computing device 1000 may further include a bus 1040. The memory 1020 and the communication interface 1030 may be connected to the processor 1010 via the bus 1040. The bus 1040 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 1040 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The fact that only one line is used does not mean that there is only one bus or one type of bus.
[0073] It should be understood that in the embodiments of the present application, the processor 1010 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. Alternatively, the processor 1010 may be one or more integrated circuits for executing relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0074] The memory 1020 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1010. A portion of the processor 1010 may also include a non-volatile random access memory. For example, the processor 1010 may also store information about the device type.
[0075] When the computing device 1000 is running, the processor 1010 executes the computer-executable instructions in the memory 1020 to perform the operating steps of the above method.
[0076] It should be understood that the computing device 1000 according to the embodiment of the present application can correspond to the corresponding subject in executing the method according to each embodiment of the present application, and the above-mentioned other operations and / or functions of each module in the computing device 1000 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0077] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0078] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0079] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0080] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0081] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0082] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0083] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program is used to execute the above method, which includes at least one of the solutions described in the above embodiments.
[0084] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media.Computer-readable media can be computer-readable signal media or computer-readable storage media.Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof.More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connection with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination thereof.In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0085] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0086] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0087] The computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0088] It should be noted that the embodiments described in this application are only a part of the embodiments of this application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the above detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the application for protection, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0089] The words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0090] In the above description, the numbers representing the steps involved do not necessarily mean that the steps must be executed. Intermediate steps may also be included or replaced by other steps. If permitted, the order of the previous and next steps may be interchanged or executed simultaneously.
[0091] The term "comprising" as used in the specification and claims should not be construed as limiting to what is listed thereafter; it does not exclude other elements or steps. Thus, it should be interpreted as specifying the presence of the features, integers, steps, or components mentioned, but not excluding the presence or addition of one or more other features, integers, steps, or components, or groups thereof. Thus, the expression "a device comprising means A and B" should not be limited to a device consisting solely of components A and B.
[0092] The term "one embodiment" or "an embodiment" mentioned in this specification means that the specific features, structures, or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0093] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present application has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, all of which fall within the scope of protection of the present invention.
Claims
1. A file system, characterized in that: include: A creation module is configured to create a file index node structure for each file. The file index node structure includes a self-destruct flag, a maximum authorization period, and a permission data block pointer. The permission data block pointer is configured to point to a permission data block. The permission data block contains and stores an access permission structure for at least one user. The access permission structure includes a user group ID, usage rights, and an authorized usage period. The access control module is used to control the access of users according to the file index node structure and access permission structure of the file when the user accesses the file; The self-destruct module is used to self-destruct files whose maximum authorization period has expired and whose self-destruct flag is enabled.
2. The system according to claim 1, wherein: The maximum authorization period in the file index node structure is the maximum value of the authorized usage periods in all access permission structures of the file stored in the permission data block.
3. The system according to claim 1, wherein: The execution logic of the access control module for user access control includes: When a user accesses a file, it is determined whether the maximum authorization period of the file has expired based on the creation time of the file and the maximum authorization period in the file index node structure; If it has not expired, the user's access permission structure is indexed according to the permission data block pointer in the file index node structure, and the user's authorized use period for the file is determined according to the access permission structure. If it has not expired, the user is granted permission to use the file; If the maximum authorization period expires, the self-destruction function of the self-destruction module is triggered.
4. The system according to claim 1, wherein: The self-destruct module is also used for: Regularly or periodically determine whether the maximum authorization period of each file has expired based on the creation time of each file and the maximum authorization period in the file index node structure, and self-destruct the files whose maximum authorization period has expired and whose self-destruction flag is enabled.
5. The system according to claim 1 or 4, characterized in that The execution logic of the self-destruction module for self-destructing files includes: Fill the file content of the file with a random value and delete the file entry from the file directory structure to which the file belongs.
6. The system according to claim 1, wherein: The creation module is further configured to create at least one file directory structure, wherein the file directory structure includes index node pointers of all files under the file directory; When a user accesses the file directory, the file index node structure corresponding to each file is traversed according to the index node pointers of all files to verify the maximum authorization period of each file and the user's authorized usage period and usage rights.
7. The system according to claim 1, wherein: The file index node structure also includes a general index node, which stores the creation time of the file.
8. A file access control method, applied to a file system according to any one of claims 1 to 7, characterized in that: include: In response to the permission addition request, the newly created access permission structure is written into the permission data block, and the maximum authorization period in the file index node structure is updated according to the authorized usage period in the access permission structure; In response to a user's request to access a file, determine whether the maximum authorization period of the file has expired based on the file index node structure of the file; if not, determine whether the user's authorized use period of the file has expired based on the user's access permission structure; and grant the user permission to use the file if it has not expired; If the maximum authorization period of the file expires and the self-destruction flag is enabled, the file will be self-destructed.
9. The method according to claim 8, characterized in that The updating of the maximum authorization period in the file index node structure according to the authorization period in the access permission structure includes: The authorized usage period in the newly created access permission structure is compared with the maximum authorized usage period in the file index node structure. When the authorized usage period is greater than the maximum authorized usage period, the authorized usage period is updated to the maximum authorized usage period.
10. A computing device, characterized in that include: processor; a memory for storing one or more programs; When the one or more programs are executed by the processor, the processor implements a file access control method as described in any one of claims 8 to 9.