PeterHuewe / tpm-emulator

The famous tpm-emulator by Mario Strasser, previously hosted on BerliOs. It supports TPM1.2 only!
GNU General Public License v2.0
177 stars 75 forks source link

Permission Denied using examples for TPM/J #29

Closed gmitaros closed 5 years ago

gmitaros commented 6 years ago

I am trying your Usage Examples for TPM/J and when i run java edu.mit.csail.tpmj.tools.TPMInfo i get this: gmitaros@ubuntu:~/tpm/tpmj/lib$ java edu.mit.csail.tpmj.tools.TPMInfo BasicTPMDriver: TPMIOException encountered. (edu.mit.csail.tpmj.TPMIOException: java.io.FileNotFoundException: /dev/tpm0 (Permission denied)) Waiting 2.0 s, then retrying ... ^Cgmitaros@ubuntu:~/tpm/tpmj/lib$

i runned also ls -l /dev/tpm and i get: `gmitaros@ubuntu:~/tpm/tpmj/lib$ ls -l /dev/tpm crw-rw---- 1 root root 10, 224 Mar 20 22:41 /dev/tpm lrwxrwxrwx 1 root root 3 Mar 20 22:41 /dev/tpm0 -> tpm Also check here: where i change the group i get an another error gmitaros@ubuntu:~/tpm/tpmj/libls -l /dev/tpm* crw-rw---- 1 root gmitaros 10, 224 Mar 20 22:41 /dev/tpm lrwxrwxrwx 1 root root 3 Mar 20 22:41 /dev/tpm0 -> tpm gmitaros@ubuntu:~/tpm/tpmj/lib$ java edu.mit.csail.tpmj.tools.TPMInfo BasicTPMDriver: TPMIOException encountered. (edu.mit.csail.tpmj.TPMIOException: java.io.FileNotFoundException: /dev/tpm0 (Input/output error)) Waiting 2.0 s, then retrying ... ^Cgmitaros@ubuntu:~/tpm/tpmj/lib$ `

I am using Ubuntu 16.04 in a Virtual machine(VMWare 14).

PeterHuewe commented 5 years ago

Maybe try either to set a simple chmod 777 on the device or run your examples with sudo. It's not perfect security, but we are talking about a tpm "emulator" anyway.