LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-20-2005, 03:54 PM   #1
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Rep: Reputation: 47
sharing network files between Linux boxes


I have a router and 2 pcs that I think are already networked (ifconfig on both pcs shows an eth0 IP of 192.168.1.xx). How would I share files from 1 Linux pc to the other Linux pc?
 
Old 04-20-2005, 04:19 PM   #2
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
You can setup ftp servers on both boxes.

I wonder if there is a Windows-like file sharing thing but only for sharing files between linux systems.


--EDIT-- to setup ftp

edit /etc/inetd.conf with your favorite text editor and uncomment a line:

from this:

# Very Secure File Transfer Protocol (FTP) server.
#ftp stream tcp nowait root /usr/sbin/tcpd vsftpd

to this:

# Very Secure File Transfer Protocol (FTP) server.
ftp stream tcp nowait root /usr/sbin/tcpd vsftpd

----

then restart your computer

then you can edit /etc/vsftpd.conf and /etc/ftpusers to your likings


Last edited by houler; 04-20-2005 at 04:24 PM.
 
Old 04-20-2005, 04:44 PM   #3
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
Then what? When I try to do a ftp in Firefox I get a window that says my connection was refused. Do I somehow need to set permissions on both pcs so that any user can access the harddrives?
 
Old 04-20-2005, 05:00 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You could set up NFS share too...
 
Old 04-20-2005, 05:06 PM   #5
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
Quote:
Originally posted by linuxhippy
Then what? When I try to do a ftp in Firefox I get a window that says my connection was refused. Do I somehow need to set permissions on both pcs so that any user can access the harddrives?

Did you configure /etc/ftpusers and /etc/vsftpd.conf to your likings?

if so

try this in the browser:

ftp://username@localaddress

in my case:

ftp://houler@192.168.0.234

Now it prompts for a password, type it in. Then you should get a list of files.

--EDIT--

Also, if you set inetd.conf, /etc/ftpusers, /etc/vsftpd.conf on BOX1, that is only set for BOX1.
Like if you Are on BOX2 and you ftp to BOX1, you're going to have to use the username/password that is used on BOX1.



You have to apply the steps above to other boxes if you want to access there files.

Last edited by houler; 04-20-2005 at 05:49 PM.
 
Old 04-20-2005, 07:24 PM   #6
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
This isn't working. Box 1 has Slackware 10 with kernel 2.4.30 and Box 2 has Fedora Core 3 with kernel 2.6.11. I am trying to have Box 1 (Slack) contact Box 2 (FC3). In Box 1 (Slack) I edited /etc/ftpusers and took out ftp after editing /etc/inetd.conf and rebooting Box 1. I tried to edit /etc/vsftpd.conf but it doesn't exist so I didn't create it.

Box 1 has local IP 192.168.1.43 and username marty.
Box 2 has local IP 192.168.1.44 and username linuxhippy.

In Firefox on Box 1 I type the following to contact Box 2:

ftp://linuxhippy@192.168.1.44

What am I doing wrong?
 
Old 04-20-2005, 08:20 PM   #7
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
Quote:
Originally posted by linuxhippy
This isn't working. Box 1 has Slackware 10 with kernel 2.4.30 and Box 2 has Fedora Core 3 with kernel 2.6.11. I am trying to have Box 1 (Slack) contact Box 2 (FC3). In Box 1 (Slack) I edited /etc/ftpusers and took out ftp after editing /etc/inetd.conf and rebooting Box 1. I tried to edit /etc/vsftpd.conf but it doesn't exist so I didn't create it.

Box 1 has local IP 192.168.1.43 and username marty.
Box 2 has local IP 192.168.1.44 and username linuxhippy.

In Firefox on Box 1 I type the following to contact Box 2:

ftp://linuxhippy@192.168.1.44

What am I doing wrong?

This should be in your inetd.conf, notice that thereis is no # in front of 'ftp stream tcp nowait...'

ftp stream tcp nowait root /usr/sbin/tcpd vsftpd

That's what I mean by 'uncomment', copy the line above if you deleted that line to your inetd.conf file.

reboot.

This should work if you have vsftpd installed.

If you can't find /etc/vsftpd.conf, do a 'whereis vsftpd' to look for the conf file and edit it. If nothing comes up when you do execute that command then you don't have vsftpd installed. Go back to /etc/inetd.conf and comment the 'vsftpd' line and uncomment the 'proftpd' line, then do a 'whereis proftpd' and find and edit the conf file.


Now for Box 2:

If you want to connect Box 2, then you're going to have to set FTPD on Box 2 , like you did with Box 1. Edit /etc/inetd.conf and uncomment the line with 'proftpd' or 'vsftpd' to enable it, don't uncomment both, choose 1.

Do a 'whois proftpd' and edit the config file to suit your needs, also edit the /etc/ftpusers/ file to allow which users are authorized to connect to Box 2.

Last edited by houler; 04-20-2005 at 08:26 PM.
 
Old 04-21-2005, 04:00 AM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Although ftp is fine to share files, I use for my part NFS share which is
more user friendly in my opinion (no need to login, access to shares as
they were local directories)

The setup is simple, on box 1:
edit /etc/exports (if it does not exist, install nfs-utils package) :
Code:
/home/marty    192.168.1.44(rw, sync)
Start nfs server and portmap on box 1 :
Code:
/etc/rc.d/rc.portmap start
/etc/rc.d/rc.nfsd start
Now go to box 2 and add an entry in fstab :
Code:
192.168.1.43:/home/marty   /net/marty  nfs  rsize=8192,wsize=8192,timeo=14,intr  0  0
Create the mount point in box 2, mkdir -p /net/marty
Now to access box 1 shared directory /home/marty, you just do :
Code:
mount /net/marty
And after that you browse into it with any file manager/browsers you
want at /net/marty
 
Old 04-21-2005, 04:20 AM   #9
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
houler, in Fedora Core 3 (Box 2) /etc/inetd.conf does not exist-they are different than Slack.

keefaz, NFS sounds good. My router is setup as a DHCP, so those IP addresses will change a bit. In fstab could I enter a wild card to include a series of #s:

192.168.1.*
 
Old 04-21-2005, 04:28 AM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
My router has a little DNS server so I use hostnames instead
of IPs in my setup, maybe your router has this feature ?
 
Old 04-21-2005, 04:43 AM   #11
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
Quote:
Originally posted by keefaz
My router has a little DNS server so I use hostnames instead
of IPs in my setup, maybe your router has this feature ?
not my router
 
Old 04-21-2005, 05:11 AM   #12
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
I would also recommend NFS but I've never tried to use it under dynamic ips, if you can't get it, you could also use Samba (easier with dynamic IPs I guess).
 
Old 04-21-2005, 06:02 AM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You can also set up the nfs dynamically, with exportfs
(so without set up ip in /etc/exports)
on the box 1 :
Code:
/usr/sbin/exportfs 192.168.1.44:/home/marty
and mount it without fstab on the client box2
Code:
mount -t nfs 192.168.1.43:/home/marty /net/marty
 
Old 04-21-2005, 03:27 PM   #14
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
Sorry about that linuxhippy, I don't know anything about Fedora. Remember google is your friend , or You can ask the nice people over at the Fedora forum for help on setting up a basic ftp server .

NFS sounds promising so far. I may try it one of these days, as I only have 1 computer running linux (this one, which is a laptop).

What are the security features of NFS?
 
Old 04-21-2005, 04:26 PM   #15
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
What do you mean by security features ?
When you share a directory with NFS, it keep system permissions for files,
you can also explicitly share a directory as read-only (it is read-write by
default), you can map permissions to a user and more (see man exports)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A local wireless network for sharing files (linux desktop+linux laptop+mac laptop) whyatt Linux - Wireless Networking 1 11-01-2005 03:17 PM
ad-hoc connection (and internet sharing) between two linux boxes. A complex question. riccisit Linux - Wireless Networking 1 09-29-2005 09:02 AM
Fedora Core and Slack boxes sharing files!! linuxhippy Slackware 1 05-02-2005 06:22 PM
Backing up files on Windows boxes to Linux thosm Linux - Software 1 04-08-2004 06:36 PM
Sharing Folders between Linux Boxes JCScoobyRS Linux - Networking 2 03-25-2004 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration