Use /unlock then use /cpublic.
You can lock chests, doors, trapdoors, fence gates, furnaces, dispensers, and droppers.
Why not enderchests? Enderchest contents are per-player, so if you have stuff in an enderchest, someone else will see other stuff in they’re enderchest.
/passlock password or /cpassword password
To use this command you must first /unlock your item.
The password command will lock your item and add a password that needs to be used to unlock it once per login. The password can be anything that you will easily remember. You can give it to anyone to get into your chest/furnace/door.
Use /cmodify [Person’s name] then hit the chest/door/furnace/dispenser. This applies to other lockable things.
You can use /lock to protect your chest/door/furnace/dispenser.
LWC is what we use so people can’t steal from you, by default, you won’t need to type /lock on your chests, just doors, fence gates and trapdoors.
Also, when you place something lockable, it automatically is locked so just you can open it.