몇 가지 추가 모듈을 로드해야 합니다. 그 중 하나가 /dev/knem 파일을 생성합니다. 권한을 0666으로 설정해야 기본적으로 chmod 0666 /dev/knem
괜찮지만 시작 시 직접 할당하고 싶습니다.
모듈을 로드할 때 커널이 직접 설정하도록 구성을 어디에 작성해야 합니까?
미리 감사드립니다
답변1
제가 틀렸을 수도 있지만 /dev/knem을 마운트할 때 udev 규칙을 사용하고 0666 권한을 할당할 수 없습니까?
http://www.reactivated.net/writing_udev_rules.html#syntax
Controlling permissions and ownership
udev allows you to use additional assignments in rules to control ownership and permission attributes on each device.
The GROUP assignment allows you to define which Unix group should own the device node. Here is an example rule which defines that the video group will own the framebuffer devices:
KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video"
The OWNER key, perhaps less useful, allows you to define which Unix user should have ownership permissions on the device node. Assuming the slightly odd situation where you would want john to own your floppy devices, you could use:
KERNEL=="fd[0-9]*", OWNER="john"
udev defaults to creating nodes with Unix permissions of 0660 (read/write to owner and group). If you need to, you can override these defaults on certain devices using rules including the MODE assignment. As an example, the following rule defines that the inotify node shall be readable and writable to everyone:
KERNEL=="inotify", NAME="misc/%k", SYMLINK+="%k", MODE="0666"
UDEV 규칙 생성에 대한 단계별 지침은 이 문서에서 확인할 수 있습니다.http://ubuntuforums.org/showthread.php?t=168221