File sharing with Curlftpfs for Dingo

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

File sharing with Curlftpfs for Dingo

#1 Post by kirk »

This Rox Application uses Curlftpfs, Mpscan, Pure-ftpd, and Rox to setup a file sharing system, that is similar to Samba (windows) file sharing to the user. The intent is that this will be used between two computers running Puppy. Inside of the File-Sharing folder you will find a Rox application named Setup-Sharing. Clicking on Setup-Sharing will open a series of windows that will let you start the FTP server or search for another server on your network. Then it will make a Rox app that you can click on to connect to the server. Then just drag and drop.
Attachments
shot1.png
(15.91 KiB) Downloaded 6259 times
shot2.png
(14.56 KiB) Downloaded 6408 times
shot3.png
(22.03 KiB) Downloaded 6201 times
shot4.png
(32.06 KiB) Downloaded 6466 times

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#2 Post by kirk »

Here's the packages. You'll need a updated Curl package. The one the Dingo alpha 5 won't work with Curlftpfs. The older versions of Curl work and the latest version of Curl works. Bad luck :( Maybe Barry will upgrade the package before Dingo final?

And You'll need pure-ftpd.

Some limitations:

* Permissions are not preserved, so ROX reports errors. Copied files are created with a umask of 022.
* Symlinks don't copy.
* The FTP server will not allow root logins.

The no root logins are intentional, for the others, I haven't found a work around.
Attachments
File-Sharing.pet
(59.83 KiB) Downloaded 2030 times
pure-ftpd-1.0.22.pet
(29.47 KiB) Downloaded 2074 times
Last edited by kirk on Fri 18 Jan 2008, 16:24, edited 1 time in total.

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#3 Post by kirk »

Here's the source packages for Curlftpfs and Mpscan. Not needed to test.
Attachments
mpscan-0.1.0.tar.gz
(54.11 KiB) Downloaded 1865 times

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#4 Post by HairyWill »

kirk
Have you tested this on a clean install? I can't get it to work. Though I'm trying on a severely second hand install of 3.01.
When I try and setup the server I get a messagebox telling me that "the shared folder is" but that bit is blank.

I think it is an excellent idea and a lot cheaper (and hopefully easier) than installing samba
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

Well this works well on puppy 2 series...very very very neat....I was using gftp and pure-ftpd before but this method rocks :)

Also works equally well from a windows machine to puppy with a simple freeware win32 ftp server ........
The no root logins are intentional,
for my own interest how can root logins be acheived?

nice one...much appreciated...I've always avoided netbios on windows as its a common virus target and full samba is huge in puppy terms

regards

mike

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#6 Post by kirk »

HairyWill,

This is for Dingo. In Dingo there is a user ftp who's home directory is /root/ftpd. The pure-ftpd package was left out of dingo alpha 6, but it has a problem anyway. The folder /root/ftpd needs it's owner changed to ftp and permissions set to 755 or 777. I don't know if it will work in 3.01 (depends on the version of curl). To try you'll have to add a new user named ftp and make it's home directory /root/ftpd. Then the symlink about the shared folder should work. Seems like there was a problem in 3.01 with adding users.


Mikeb,

To enable root logins you'll need to right click on Setup-Sharing and select Look Inside. Then right click on AppRun and open as text. On lines 17 and 23 you'll see this:

pure-ftpd -zMbBADHk 90 -u 1 -U 022:022

You'll want to change it to this:

pure-ftpd -zMbBADHk 90 -U 022:022

The -u 1 option is what tells pure-ftpd not to allow root logins.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#7 Post by mikeb »

Thanks kirk

I was looking at the pure-ftp documentation but not getting very far..

regards

mike

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#8 Post by HairyWill »

thanks kirk
I installed tinylogin using the package manager, followed your instructions.
The ftp server started successfully.
I am messing around with client and server on the same machine so I don't expect results to be conclusive.
I don't seem to be able to edit the shared stuff, I presume that is curl problem and I don't expect an answer I should be able to work that out.

A couple of points:
The subnet scan takes a while, some sort of progress indicator would be nice.
You might consider some mechanism for stopping the share. (yes I know, killall pure-ftpd)
The way you have used roxapps to look like the shares is clever though I didn't find it intuitive. That might just be how my head is organised, but a menu item and/or desktop icon might be good.
Some way of identifying share status might be helpful, is my share open, which others am I connected to.

If I'm being picky its because I think this is a really good idea, keep up the good work.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#9 Post by mikeb »

The way you have used roxapps to look like the shares is clever though I didn't find it intuitive.
Once a once a shared folder is made I dragged it to the pinboard/desktop which makes for simple access.

The share(s) can be accessed though open file dialogs when hidden files are shown, I tried using curlftpfs to mount to a convenient folder and it does give transparent access....my thought is to leave the share on permanently rather than open/close with rox similar to the windows network drive approach.
I don't seem to be able to edit the shared stuff, I presume that is curl problem
hmm seem to be stuck on this one...browsing a share on a windows machine using
http://www.pablosoftwaresolutions.com/h ... _lite.html

gives full r/w/delete/rename access (worked in wine also but slow).
I think this is a really good idea,
same here :)
mike

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#10 Post by kirk »

Yes, the idea was to have the icons on the desktop. The connections are unmounted when you close the Rox window that opened for the shared folder. To stop the ftp server, when you go to menu - Network - Pureftpd in Dingo ( hopefully in the next release) , the pure-ftpd script will detect that pure-ftpd is running and offer you the option to kill it. But just leaving it running shouldn't be a problem.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#11 Post by Lobster »

8) Very interesting.
This will be very useful for cybercafes, education, business etc :)

This is for a LAN?
Is there any way of using this over the Internet in a VPN (I think that is the right term) I believe we have something similar but what you are doing seems very simple to use and implement from the end user perspective.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#12 Post by kirk »

LAN, internet doesn't matter. Through the internet you'll probably have to set your router to forward port 21.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#13 Post by mikeb »

For those wanting to use root access to give full read/write ablities ... (behind a router or firewall!) the line in the appropriate apprun

curlftpfs ftp://192.168.1.2 /root/File-Sharing/...etc

would become

curlftpfs ftp://root:@192.168.1.2 /root/File-Sharing/...etc
assuming the default password of 'blank'

curlftpfs ftp://root:your_password@192.168.1.2
for more secure setups.

note that
curlftpfs ftp://root:@192.168.1.2/../mnt/hda5
would mean rox would open up in hda5...handy as simlinks are not followed.

The commandline for pureftp would need modding to allow root access as described earlier in this thread.

The same approach could be used to logon as user with suitable access rights.

mike

:oops: ..kirk's script sets the password :oops:

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#14 Post by mikeb »

Ok more useful post time

there is a very useful wndows utility called netdrive (originally from novell) which basically can mount your puppy ftp file shares via pureftp just like a mapped network drive ...download and info here
http://louisville.edu/web/docs/howto/webdav/netdrive

mike

oh the joy of file browser friendly network shares :D

edit..hang on I can access my website using curlftpfs..Is there no end to this!

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#15 Post by kirk »

I've updated the File-Sharing app. Here's the changes:

* When you scan for servers and connect, if the server is not anonymous you'll be prompted for a user name and password.

* When starting the server you're given the choice of allowing anonymous connections or requiring a user name and password.

* Root logins are allowed.

* Updated the help file.

* Fixed some bugs.
Attachments
File-Sharing.tar.gz
(60.98 KiB) Downloaded 1906 times

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#16 Post by mikeb »

Thanks for the extra features. :)

Use it all the time

Mike

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#17 Post by kirk »

Thanks for the feed back. :)

User avatar
Inuyasha
Posts: 117
Joined: Sat 21 Jul 2007, 15:28

#18 Post by Inuyasha »

What about prerequisites?

There is a serious lack of documentation on this, which makes me want to use ssh and a dhcp-3 server along with other methods of NFS. I don't understand your program kirk, nor do I know how to work it. Having as few as three steps leaves a lot of mental gaps.
[img]http://tinypic.com/43nkxdw.png[/img]
[img]http://tinypic.com/2me7cie.png[/img]

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#19 Post by kirk »

What about prerequisites?
It's included in Puppy4 so if you're asking about dependencies for an older version of puppy, let me know. It uses an FTP server, so port 21 needs to be open.
There is a serious lack of documentation on this
Did you click the help button in the application?

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#20 Post by SFR »

Hi Kirk

Phew, almost 6 year since the last post. :)
Anyway, I have started using ~/File-Sharing app recently and found very annoying issue - the app uses 'rox -n' to open ROX-Filer's window (without forking it to the background), so after closing the share, it can be automatically unmounted in the next line.
Unfortunately, the use of '-n, --new start new copy; for debugging the filer' option somehow breaks all further SOAP RPC calls, hence desktop drive icons cease to refresh after that.
I like and want to keep the auto-unmount feature (it's safer than leaving it mounted all the time), but haven't found anything better than this, polling-based solution:
rox -d "${SHARE_POINT}/.$IPT"
while xwininfo -root -tree | grep -F "${WIN_NAME}" >/dev/null; do sleep 1; done
fusermount -u "${SHARE_POINT}/.$IPT"
Perhaps you'd have an idea how to resolve it in a more decent way..?

Other than that, I let myself to improve some other things (hope you don't mind?):
- can also stop the server and remove autostart from /etc/rc.d/rc.local
- can prevent root connections
- portability (i.e. the app is not hardcoded to be in /root/ anymore)
- scripts from /scripts dir are no longer needed
- "Hide typing" option for password fields
- gettext
- some rearrangements and minor fixes

I have attached the modified AppRun.
It was modified and works fine in latest Slacko-5.7, haven't tested in other Puppies though...

EDIT: there was a bug in setting up password-protected (no root) server. Corrected and re-uploaded after 2 downloads. Sorry...

Thanks for the app &
Greetings!
Attachments
AppRun.tar.gz
Unpack and copy to ~/File-Sharing/Setup-Sharing/
(3.31 KiB) Downloaded 291 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Post Reply