Fixed code that sets permissions on /dev/shm