While @joeqwerty's comment can be interpreted as technically wrong (more on that later), he is correct that generally speaking when you configure a Windows file share, you don't give access to computers. You give access to users or groups (that contain users).
If we assume what you mean in your question is that you want all users on PC B to Read/Write, all users on PC C to Read only, and all users on PC D to have no access, there are a few ways to make that happen.
Homegroup is no good because you don't really have granularity of permissions. Based on your question, I'm guessing you don't have an Active Directory domain either. So you're pretty much stuck with using what is called "pass-through authentication".
The short version of this is that for each local user on your client PCs, you need to create an identical local user on your server PC with the same username and password. When User1 on PC B tries to access the share on the server, Windows will pass through the credentials to the server. And because there is an identical set of credentials on PC A, it will accept them as valid and PC B's User1 will have whatever access has been given to PC A's User1.
Then, it's just a matter of configuring your share with the permissions that give each user the read or read-write access they need. You can save yourself some time and effort by creating groups on PC A for each type of access like MyShareReadOnly
and MyShareReadWrite
. Then instead of adding permissions for each individual user, you can just add permissions for the two groups. This also makes it easier to change a given user's access in the future because you just need to change which group they're in.
The caveat to this method is that you can't have the same username exist on different client PCs unless you want them to have the same access on the server. And even if you do, you need to make sure the password is kept in sync on all of them.
P.S. Re: giving computers access to stuff
I know @joeqwerty probably already knows this. But in an Active Directory domain, you can actually give computers access to stuff directly. This is possible because computers have their own account in the domain just like users.
So if you grant permissions to that computer account, software running on the computer in the context of the computer's account can access whatever it was given permission to. It's not a super common configuration, but it is possible.
This is not the same as giving all users on the computer access though. They will generally still be running software in the context of their own user account, not the computer's. It's more for running headless software like Windows Services or web servers.