I have two ubuntu machines (
machineB)connected through a wired Ethernet cable. I'm asking how I can give full permission and access of
machineA to a certain folder
Folder1 in the
machineB over the network using terminal?
Basically, I see two possibilities: Samba or NFS. Both are client/server software which means you need to install the client part on your machineA and the server part on your machineB. From that point on, you can get access the files on the server via any software (including terminal) on the client.
On the differences, samba is based on the windows world. Therefore, files made available in samba are readily available also to Windows-based PC.
NFS stands for Network File System and allows you to mount on PC A (the client) directories that reside on PC B (the server). Once setup, it is completely transparent to the user. A standard windows PC would not see them, however.
A more complete discussion on the differences can be found here: Which to use NFS or Samba?
For a fairly complete discusion on how to install NFS, see https://help.ubuntu.com/community/SettingUpNFSHowTo