HOWTO : Share files and folders between Computers

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

HOWTO : Share files and folders between Computers

#1 Post by rarsa »

This HOWTO should allow you to share files between puppy and other computers (Pupy, windows, linux, etc).

They are focussed on Puppy to Windows but they can easily be extrapolated for Puppy to other OS's

This HOWTO has two parts:
- The firsts part is sharing a windows folder and letting Puppy see it
- The second part is sharing a puppy folder and letting windows see it.

I will separate then into two individual posts as to simplify references.

Although there seem to be many steps, it's actually quite simple, I just wanted to go step by step good enough for a new user.

I will copy the contents to these HOWTOs to the wikki once I'm done for easy reference.
Last edited by rarsa on Fri 09 Sep 2005, 14:00, edited 2 times in total.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

How to let puppy see a windows share

#2 Post by rarsa »

How to let puppy use a windows share

Prerequisite:
In Windows share a folder/drive following these Microsoft instructions

Introduction:
In Puppy there are two ways. The LinNeighborhood and the command line.
- The LinNeighborhood is a graphic tool so some people will find it more attractive.
- The command line may be intimidating but it's easier to use once you know the command and allows you to connect to the shared folder when you start puppy.

LinNeighborhood:
1. From the start menu select "Network | LinNeighborhood Samba client"
2. Click the "Add" button.
3. Leave Machine and Group empty
4. on IP address type the IP address of your Windows computer.
5. Click the "query" button.
6. You should receive the message "query host... done". If not, check that the IP address is correct and that your network is working OK and repeat step 5.
7. Click OK. The Windows computer should appear on the main window list.
8. Right click on the computer name/address and select "scan as user"
9. Leave domain empty, username as root and password empty. You should see the list of shares on the main window list
10. Right click in the share you want to use and click "mount"
12. Set the parameters for the mount or accept the defaults. The "mount point" is the puppy folder under which you will see the contents of the shared folder. (write down that path so you remember where it's mounted)
13. Click "Mount". Rox should open on that folder
Done!

Command Line
While it's quite easy to do it in LinNeighborhood, there is no way to save your connections so you can connect automatically the next time you start Puppy. For that, the command line comes to the rescue.

1. Open the rxvt console terminal. "start | run | rxvt"
2. Use the following command to mount the shared folder:

smbmount //<serveraddress>/<sharedfolder> <mountpoint> username=<username> password=<password>

where
<username> and <password> are your username and password in the windows computer. If you don't have a password then don't put this parameters and when prompted for a password just press enter.
<serveraddress> is the IP address of your server
<sharedfolder> is the name of the shared folder
<mountpoint> is the folder where you will see the contents of <sharedfolder>. The <mountpoint> folder must exist and be empty.

For example in my home network
my windows computer address is 192.168.1.99.
I share a folder with a very creative name of "shared"
I want to see the contents of that folder under /mnt/windows2

The command I use is the following:

Code: Select all

smbmount //192.168.1.99/shared /mnt/windows2 
Please bear in mind that this only works consistently if your windows XP computer is using static IP. If you use dynamic IP you are not guaranteed to always get the same IP address.

3. If you want to connect to the same share everytime you startup puppy, do the following:

Set the Windows computer to use static IP, if you don't, this step may not work consistently.

Open /etc/rc.d/rc.local in a text editor. This file get's executed everytime you start puppy.
Add the smbmount command you did on the previous step to the end of the file.
Save the file.

Done!
Last edited by rarsa on Fri 09 Sep 2005, 14:01, edited 5 times in total.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

How to let Windows see a puppy folder

#3 Post by rarsa »

How to let Windows see a puppy folder

In most linux distributions you would do that using a NFS (Network file system) share or a SAMBA share. Puppy does not provide those services but that does not mean that everything is lost, you can use FTP and you will barelly notice the diference from windows.

Puppy includes a simple FTP server called BeteFTP: " start | Network | BetaFTPD FTP server".

The default allows users to see the contens of a folder under /root/ftp and no more. What do you do to allow sharing a different folder, even sharing the full puppy filesystem? Here are the steps:

In Puppy:
1. Create the folder you want to share. If it is an existing folder such as / or /root , skip this step. You can create a new folder in rox or with the mkdir command.
2. Add a new user with the "adduser" command. This will be the user that you will use to see your shared folder. The adduser command will ask you for a password, you MUST enter a valid password.

NOTE:
paulh177 wrote:BusyBox adduser is broken in Puppy 3.
Download TinyLogin using PetGet and try adding tinylogin at the begining of each command e.g.

Code: Select all

tinylogin adduser -h /root  localuser
Here are some examples:

To add a user called "localuser" that will share /root and that you cannot use to login to puppy, write the following command:

Code: Select all

adduser -h /root  localuser
To add a user called "mp3shares" that will share /root/my-music:

Code: Select all

adduser -h /root/my-music  mp3shares
To add a user called "top" that will share the top folder / :

Code: Select all

adduser -h /  top
You can add as many users as you want each one sharing different folders. (e.g. One for your wife, one for you and one for each of your children)

3. Now start the FTP server. From the start menu select "Network | BetaFTPD FTP server"
5. Click on the "start FTP server"

From Windows:

1. Open windows explorer
2. Make sure that it shows the address bar. If it is not showing, you can right click in any tool bar and select the address bar from the pop-up menu.
3. In the address bar enter the following address ( replace <puppyIPaddress> with the actual Ip address of your puppy computer):
ftp://<PuppyIPaddress>/
and press ENTER.
4. Enter the user name and password for one of the users that you created in puppy. and click OK.

DONE! as easy as that.

If you want to learn more, click the "Help" button of the BetaFTPD window.

If you want to start the FTP server every time you start puppy, add the "betaftpd" command to the /etc/rc.d/rc.local file using a text editor such as leafpad:

Code: Select all

leafpad  /etc/rc.d/rc.local
Last edited by rarsa on Sat 26 Jan 2008, 14:57, edited 4 times in total.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

if i wanted to copy files from Puppy, i would click /root/ghttpd/httpd

files and folders (and symlinks) in /root/ghttpd/htdocs will now be available on your network and on the internet

pic: http://tinypic.com/dlm9n7.jpg

i find this easier than setting up file sharing

you may have to open a port in your firewall, or shut it down

there's a roxapp that starts/stops the httpd server with the click of a button on my dotpups page

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#5 Post by GuestToo »

if i wanted to copy files from a Windows box to Puppy, i would probably run something like HFS
http://www.rejetto.com/sw/

1 file, about 400k, doesn't need installing or uninstalling ... works about the same as httpd

User avatar
RobbieG
Posts: 16
Joined: Fri 21 Oct 2005, 06:09
Location: WI
Contact:

Re: How to let Windows see a puppy folder

#6 Post by RobbieG »

rarsa wrote:How to let Windows see a puppy folder
2. Add a new user with the "adduser" command.

Here are some examples:

Code: Select all

adduser -h /root -r /usr/bin/deny_sh localuser
Am I supposed to do this in the console window? When I do this, this is what I get back:

Code: Select all

# adduser -h /root -r /usr/bin/deny_sh localuser
adduser: invalid option -- r
Tinylogin v1.4 (2005.08.02-19:41+0000) multi-call binary

Usage: adduser [OPTIONS] <user_name>

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#7 Post by rarsa »

Oh, sorry, I wasn't using tinylogin but the full bash when I wrote that example. That command is only an example.

To add the user just type in the console

Code: Select all

adduser   -h   /root   localuser

User avatar
RobbieG
Posts: 16
Joined: Fri 21 Oct 2005, 06:09
Location: WI
Contact:

Thank you

#8 Post by RobbieG »

Thanks!

sildan

#9 Post by sildan »

Thanks!

I have on more question: How to remove a user? I've tried the obvious commands like deluser, but that doesn't work. I get the message "deluser: sildan: User could not be removed from /etc/passwd"

And the user is definately not deleted. When I try to add the same user again, I get the message "adduser: sildan: login already in use"

Where are the users stored? And howto finally remove them?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#10 Post by rarsa »

That's strange, in my computer the user gets deleted with deluser.

I also get the error of not being able to delete it from gshadow but that's not a real error if it was never added there.

To make sure that it's completelly removed, after deluser, also check the following files

/etc/passwd
/etc/group
/etc/gshadow
/etc/shadow
/etc/shadow-

Please note that in some files you will see the user number instead of the user name.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#11 Post by sunburnt »

Ooops I hit the Esc key & it double posted... sorry!
Last edited by sunburnt on Wed 23 Nov 2005, 11:31, edited 1 time in total.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#12 Post by sunburnt »

rarsa: I tried to mount a Win. share name S, no luck, you say to use smbmount, I get a usage report saying to use: mount - t smbfs //192.168.0.102/S /mnt/data
And it returns: invalid argument, I have an IP display on the Win box so that's right, & the share panel-share name is: S
I'm not sure what the invalid argument is, & why doesn't smbmount command work?
I did all of this awhile back & it was never resolved, hope I have better luck this time.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#13 Post by rarsa »

What version of Puppy are you using?

I am at the office right now and cannot test. I will test this evening after you post the version you are using.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#14 Post by sunburnt »

John Murga's 128 Special 1.0.5, but I've had the trouble with others.
128spec. is only Puppy that LANboots, need to mount HOME, & eventually /usr on a Win share.
LinNeighborhood does it, but it probably uses it's own mount command.
The PuppyWiki says: if you add SHELL=/bin/bash to /etc/profile, rxvt and aterm will run bash automatically.
Wiki says Puppy uses ash, could it be it's mount command is abridged & neutered?

ADDENDUM: I tried it & same error, the SHELL= command didn't have errors so I assume it worked, no change though.
I found smbmount in /usr/sbin & used the full path to it & still got: use mount -t smbfs instead.
So I cd /usr/sbin & the smbmount worked, error: session request to //192.168.0.102 failed ( Called name not present).

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#15 Post by rarsa »

When I wrote this howto I was using 1.0.5 but I've just tried using 1.0.6 and it works ok.

I haven't used murga's version. You may want to ask him if he included that command in his version.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#16 Post by sunburnt »

I removed this post because it's irrellivant now...
Last edited by sunburnt on Thu 24 Nov 2005, 02:19, edited 2 times in total.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#17 Post by rarsa »

There are just two tests I can think of:

Can you ping to the windows computer?

Can you see the share through Lineighborhood?

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#18 Post by sunburnt »

WEARD..... the IP add. of the Win PC didn't work, so just for the heck of it I tried it's name & bingo!

smbmount //192.168.0.102/S /mnt/data _____ didn't work
smbmount //160SEA/S /mnt/data ___________ DID work

I can see the share useing the PCs name, but for NFS usually the IP add. is what works, Samba seems to prefer names.

User avatar
alan
Posts: 4
Joined: Wed 30 Nov 2005, 22:07
Location: Watford UK
Contact:

#19 Post by alan »

Just one quick question - how do you get the ftp server to start automatically on boot? (with a hd install) - probably a cryptic command in /etc/rc.d/local no doubt.

Thanks

Alan

Jan E
Posts: 19
Joined: Wed 04 Jan 2006, 20:57

Remote puppy from win XP or other puppy?

#20 Post by Jan E »

Is it possible to remote puppy from a win XP or my other puppy computer?

Post Reply