in reply to IPC::Shareable::SharedMem: shmget: Permission denied

In addition to the other comments you can probably run something like

ipcs -ma

to find out what shared memory exists and who owns it. The command might be slightly different depending on your operating system. I'd guess your shared memory already exists belonging to someone else.