Is there a way to mount a Linux directory from a different PC to your local Linux PC? How?
views:
1657answers:
4You need to be a bit more specific. You can use NFS.
Depending on what distro you're using, you simply edit the /etc/exports file on the remote machine to export the directories you want, then start your NFS daemon.
Then on the local PC, you mount it using the following command:
mount -t nfs {remote_pc_address}:/remote/dir /some/local/dir
Use the man utility for more information:
man exports (Examples of configuring directories for export are on the bottom of this manual page.)
sshfs is very nice, and easy to use
sshfs user@remotesystem:/remote/dir /some/local/dir
NFS is handy since it's built-in and easy to configure, but the 2 common implementations (NFSv2 and NFSv3) don't translate usernames between the systems; user IDs are used instead. This requires you to use a central auth system such as LDAP so tha tcommon user IDs can be maintained.
sshfs requires you to connect as a single user and so accesses are always done (and consequently, can only be done) as that user.
cifs in a * nix-to-* nix connection (via Samba) both translates usernames and follows standard *nix permissions. As well, it is more flexible in that it allows you to perform ownership/permission transformation on creation of a new file or directory. It is, however, much more complex to configure.