The present invention discloses a method for setting file permissions based on hash values, the method comprising: performing a hash operation on all files to obtain a hash value for each file, and corresponding the hash value of each file, the
operation mode of each file, and the operation permission of each file one by one to form an operation rule
list; a user overwrites the address corresponding to the original
system function with the address of the rewritten
system function, thereby forming a
system call table with an updated address; the user issues an operation instruction in user mode and enters kernel mode via an interrupt program, and the kernel mode finds the address of the rewritten system function executed corresponding to the
operation mode in the operation instruction according to the
system call table with the updated address, thereby obtaining the rewritten system function. The present invention determines file permission restrictions by increasing the hash value, which can, on the one hand, avoid erroneous operations by legitimate users, such as accidental deletion of files; and, on the other hand, effectively prevent super administrator users and illegal users from stealing information of private files.