Permission Error Reported When the Kernel Is Running

Symptom

The following error message is displayed when the kernel is running:

1
2
raise PermissionError(f'Path {path} cannot have write permission of group.')
PermissionError: Path /any_path/_gen_module.so cannot have write permission of group.

Error Cause

The default permission on the file created by the current user includes group write access.

Solution

Run the umask -S command to query the permission configuration, and then run the umask 0022 command to adjust the permission configuration.
1
2
3
$ umask -S
$ umask 0022
u=rwx,g=rx,o=rx