0

Can't find this anywhere online but when trying to delete semaphore arrays and shared memory using ipcrm -m id.

I get this error permission denied for id (<id num>). Any reason why?

3
  • On what basis do you suppose that you should have permission to remove the IPC objects in question? May 13, 2022 at 0:52
  • All the time. Do I have to edit permissions to edit the ipcs? May 13, 2022 at 1:41
  • Only administrator users can use ipcs, i.e. root. Try sudo ipcrm -m id
    – Nic3500
    May 13, 2022 at 2:12

1 Answer 1

0

From the ipcrm manual:

In order to delete such objects, you must be superuser, or the creator or owner of the object.

If you, acting as an ordinary user, attempt to remove an IPC object for which you are neither creator or owner (usually both the same account) then permission will be denied. This is what is what you describe.

If you have sudo privileges on the machine then you should be able to engage them to remove others' IPCs. You should rarely, if ever, need to do this, however, because you can already remove your own IPCs, and it is almost never a good idea to remove anyone else's. If you have to ask the question, then you are not experienced enough to distinguish whether it is safe or appropriate to remove IPCs that do not belong to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.