Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 21 Nov 2014, 23:13
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Precise 5.5 PureFTPd Flash drive problem
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Packetteer


Joined: 12 May 2012
Posts: 36
Location: Long Island Ny

PostPosted: Sun 17 Nov 2013, 20:49    Post_subject:  Precise 5.5 PureFTPd Flash drive problem
Sub_title: ftpd directory is not being saved to precisesave.2fs
 

Hi All
I do not know if anyone else is seeing this or not.
But if you are I have a work around.

Problem: The root/ftpd directory is not being saved to the precisesave.2fs
file. I have two lap tops one is using a live cd to boot puppy and the
precisesave.2fs file is being saved on the hard drive as in a frugal install.
On this lap top when a file is put into the root/ftpd directory on next boot
the file is still there in the directory as it should be.

On the other lap top puppy is being booted from a USB flash drive.
the precisesave.2fs file is being saved to the same flash drive.
On this lap top when a file is put into the root/ftpd directory on next boot the file is not in the root/ftpd directory. In fact the root/ftpd
directory is empty.

The work around for this problem is
in the file /etc/passwd you will find the following line.
ftp:x:1000:1000:Linux User,,,:/root/ftpd:/bin/sh
Change the directory in the above line to read
ftp:x:1000:1000:Linux User,,,:/root/my-documents/ftpd:/bin/sh

Create a new directory in root/my-documents/ftpd
Delete the root/ftpd directory.

Note I have only used PureFTPd with anonymous log ins.

Again I do not know if somehow I am the only person who has seen
this.
Sorry if this has already been discussed. I did a search and found
nothing about this problem any where on the net.

I hope that this will help someone.

Thank you for your time in reading this.
Back to top
View user's profile Send_private_message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Fri 22 Nov 2013, 10:42    Post_subject:  

Hi Packetteer,

Thanks for this work-around.

Surprisingly, the exclusion of the /root/ftpd/ directory from the save file appears to be intentional.

When using a flash drive, saving to the save file involves the /usr/sbin/snapmergepuppy script. Apparently Barry added the exclusion on 2010-Apr-22, as documented in this comment in the script:
Code:
#100422 added ^root/ftpd exclusion.

Barry's blog entries for that and nearby dates makes no mention of this change, so I don't know his reasons for it. Some people use that directory only occasionally by temporarily copying files to it for sharing, with the originals safely stored elsewhere. So perhaps this was considered to be a "temporary" storage area, and not worth taking up space in a save file.

Of course others, such as yourself, may want the files to remain available for a longer period, so prefer that directory to be persistent. Your work-around solves that problem nicely.

Alternatively, one could make a backup of the /usr/sbin/snapmergepuppy script and remove the exclusion from the original. It is in this very long line (in Precise 5.7.1 it is line 133):
Code:
find . -mount -not \( -regex '.*/\.wh\.[^/]*' -type f \) -not -type d |  sed -e 's/\.\///' | grep -v -E '^mnt|^initrd|^proc|^sys|^tmp|^pup_|^zdrv_|^root/tmp|_zdrv_|^dev/\.|^dev/fd|^dev/pts|^dev/shm|^\.wh\.|^var/run|^root/ftpd|^var/tmp|\.XLOADED$' | grep -v -E -i '\.thumbnails|\.trash|trash/|\.part$'  |

Removing |^root/ftpd so that the line becomes:
Code:
find . -mount -not \( -regex '.*/\.wh\.[^/]*' -type f \) -not -type d |  sed -e 's/\.\///' | grep -v -E '^mnt|^initrd|^proc|^sys|^tmp|^pup_|^zdrv_|^root/tmp|_zdrv_|^dev/\.|^dev/fd|^dev/pts|^dev/shm|^\.wh\.|^var/run|^var/tmp|\.XLOADED$' | grep -v -E -i '\.thumbnails|\.trash|trash/|\.part$'  |

should allow the /root/ftpd/ directory to be saved.
Back to top
View user's profile Send_private_message 
Packetteer


Joined: 12 May 2012
Posts: 36
Location: Long Island Ny

PostPosted: Sat 23 Nov 2013, 19:36    Post_subject:  

Hi npierce
Thank you for the information.
What you said about the contents of the ftpd directory being
temporary makes a lot of sense.

One thing I need to add to the work around is that after you create
the ftpd directory in the my-documents directory you have to
set the permissions. Basically you set all the permissions so everyone
can do what ever they like in the ftpd directory. But since the only way to
this directory is through FTP and since I have set it up to use anonymous
logins no one can delete files or cause other harm.

One other thing is that the Linux box that is running this server is not
connected to the internet. It is connected to an amateur radio mesh network.

The wifi router that the server is connected to cannot be connected to via
Wifi. The only way to connect to the server is to use a another router that
has the mesh software flashed on it.

Only reason I mention the mesh stuff is so that someone does not come
back and say that the permissions cause a security risk. Not in this case.
The mesh network is a private one. Plus the server Linux box has nothing
else on it. It is just some old pc with an empty hard drive.

Again thank you npierce for your time in replying to my post and the
information you provided.

Originally I thought that the not saving of the ftpd directory contents
was a mistake. Now I know thanks to you that it is designed that way.
Back to top
View user's profile Send_private_message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Mon 25 Nov 2013, 15:27    Post_subject:  

You're welcome.

Amateur radio mesh networks sound like a great idea.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0529s ][ Queries: 11 (0.0030s) ][ GZIP on ]