Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix File Sharing Question 2

Status
Not open for further replies.

ag6969

Technical User
Jun 4, 2001
85
CA
I have a very (probably stupid) simple question that has eluded me for some time- How do you share files in a native *nix environment? I have no problems moving files back and forth with ftp, but have never been able to find a good article on Unix/Linux's native file sharing. Does anybody know of a good tutorial on this subject? I haven't been able to find one yet (I have the FreeBSD handbook and didn't see anything in there, nor can I find anything on the web). My other questions would be - How do you share a file or folder, and how would you connect to that folder from a client? (I am used to Network Neighbourhood, and mapping drives to connect to shares). I am not talking about a mixed environment, I know that's what Samba is for, just a pure *nix environment.
Thanks in advance for any help you can provide.
 
UNIX is a multi-user environment unlike windows. In the context of file sharing this means that you don't need to explicitly "share" folders or files. Access to these are controlled by the individual permissions e.g. do ls -al and you will see a directory listing with the permissions being the first column something like;
drwxr-wr--

What you may have to do is to make the filesystems readable/writable by other machines. Filesystems are the UNIX equivalent to partitions. If you type df -k you will see a list of your filesystems and some details about them, such as size and %used.

To "share" a file system, in UNIX terminology "export" a filesystem, you need to add an entry into /etc/dfs/dfstab (on Sun Solaris) or it's equivalent. In this file you can define the properties of the exported filesystem, such as it's exported name (alias) and whether it is readable or writable.

To define who is allowed to access the machine to use the exported filesystems, there are several ways of doing this. for small networks the easiest is to define the particular machines in the /etc/hosts.allow or /etc/hosts.deny files. On larger systems NIS (Network Information System) is a better option as it allows centralised administration based on user/group (UID/GID) permissions.

Well, thats a start anyway. A few key words to search on and a few concepts to look into.

Hope this helps some. Ian

"IF" is not a word it's a way of life
 
Thank You Very Much!! That is exactly (maybe even more!) what I was looking for! Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top