Click to See Complete Forum and Search --> : [SOLVED] easiest way to share a folder


nephish
08-31-2005, 08:27 AM
Hey there,
i have two pretty much identical debian systems set up at work, what i am looking for is the easiest way to share a folder between them.
samba, NFS ?
i know in Ubuntu, you can create a network by right clicking on a folder and making it a share, but i dont know how to do that in debian.

thanks

Parcival
08-31-2005, 09:09 AM
First, apt-get install samba (in case you haven't done so already).

Second, modify /etc/samba.smb.conf A sample file will already be installed that you can tweak according to your needs, just define the shares you need.

Third, add minimally one samba user, restart samba (/etc/init.d/samba stop, /etc/init.d/samba start) and test if it works. :)

nephish
08-31-2005, 09:46 AM
ok, so far so good.
how do i add a samba user?
with the adduser from the command line?
thanks

IsaacKuo
08-31-2005, 11:32 AM
I found this Debian tutorial to be immensely helpful:

http://www.aboutdebian.com/lan.htm

I found sharing folders with NFS to be a hundred times easier and ten times better than sharing folders with SAMBA. It's about twice as fast and doesn't mangle file permissions.

Basically, all you need to do is add one line to /etc/exports (create this file if none exists) to the server and add one line to /etc/fstab to the client. For example:

# This file is /etc/exports

/shared/folder 192.168.0.0/255.255.0.0(rw,sync)

and

# add this to /etc/fstab on client

myserver:/shared/folder /mnt/sharedfolder nfs rw 0 0


"myserver" is the host name of the server, or its IP address. Your server needs to have a fixed IP address, rather than use DHCP.

You also need to create the folders to be shared on the server (obviously), and also an EMPTY folder for the mountpoint on the client.

On the server, the NFS server daemon won't be running by default unless /etc/exports exists. An extreme but easy way to make sure it's running and recognizes all of your changes to /etc/exports is to reboot the server.

On the client, all you need to do to try out your changes to /etc/fstab is to try to mount the shared folder. For example, you could type in:

cd /mnt
mount sharedfolder

If for some reason you want to unmount the shared folder, you type in:

umount sharedfolder

(You might want to do this if you successfully mount, but you don't like the options that you ended up mounting as--like read only.)

nephish
08-31-2005, 11:43 AM
awesome instructions.
it took me about 3 minutes.

working now.
little easier since both systems are debian.
thanks much !