Change (DEFAULT) proftpd settings?

Post Reply
spiders
Posts: 9
Joined: Thu Jan 31, 2013 6:39 am

Change (DEFAULT) proftpd settings?

Post by spiders » Mon Mar 24, 2014 9:03 pm

I ssh'd into my box to change some ftp settings by editing the proftpd.conf file in /mnt/system/config/ , but every time I restart the ftp server via the webgui, the settings get overwritten with the default ones... does anyone know what file I should be editing to prevent this from happening?

there doesn't appear to be another proftpd.conf file anywhere, so it must be named something else...

spiders
Posts: 9
Joined: Thu Jan 31, 2013 6:39 am

Re: Change (DEFAULT) proftpd settings?

Post by spiders » Wed Mar 26, 2014 3:00 am

so far i can tell you it's not a script in the /etc/ or the /initrd/ folder ... on to the /mnt/ folder ...
i have a feeling i'm going to have to go over the entire filesystem with a fine tooth comb to find this...

Mijzelf
Posts: 6204
Joined: Mon Jun 16, 2008 10:45 am

Re: Change (DEFAULT) proftpd settings?

Post by Mijzelf » Wed Mar 26, 2014 10:53 am

It's not necessarily a template file. It could also be hardcoded in some binary. Is the proftpd binary on a r/w place?

spiders
Posts: 9
Joined: Thu Jan 31, 2013 6:39 am

Re: Change (DEFAULT) proftpd settings?

Post by spiders » Wed Mar 26, 2014 8:26 pm

alright, i think i found it..
there is an xml file in the read only area of the filesystem "/mnt/apps/usr/local/cfg/" named "proftpd.xml" ... using the script posted here i was able to edit the file to insert the debugging code. Now to restart the device....

yes! it works. now to figure out why that camera refuses to upload to the ftp server ;)




While poking around in "/mnt/apps/usr/local/cfg/", i found an interesting file in "sohoWebContent/api.html" which can be accessed on your device @ "http://yournas/api.html" which details the api to edit the functions of the nas, but i lack the knowledge of the required scripting languages to do it that way. Below is the beginning of that page (the whole thing is over 600KB):

The LifeLine API provides both an XML Remote Procedure Call (XML-RPC) interface and a simple REST/JSON interface. XML-RPC can be parsed natively by a wide variety of scripting tools, and can also be interpreted directly in a fairly easy manner. Each LifeLine function lists the arguments and return values and the key errors that may be returned.

When an error occurs, both a code and a textual description are generated. In XML-RPC, errors are returned in a well-defined structure set by its standard. Many implementations of XML-RPC use this structure to generate exceptions. In the REST/JSON interface, errors are returned as an error structure with a code and description. The error structure is 'null' on success. The XML-RPC interface is accessed through http://device/xml/FunctionName.

The REST/JSON interface takes URL arguments or posted form data as input and returns JSON encoded information. The structure of the data is flattened to simple key value pairs using a scheme that defines the structure within the field names. The data can be passed either as arguments included in the URL, or as a POSTED form with a field for each data element. The key is constructed by separating each structure in the heirarchy with a colon. Array indexes are numeric and start at index 0. Take for an example, the following argument definition for an API call:

myfunction(string value, struct s)

struct s has the following members:

name
A name member.
attribute
An attribute.
array
An array of strings.
sarray
An array of structures with the name and attribute members.

These s struct members behave as follows:

value=text
The parameter 'value' is set to 'text'.
s:name=bob
The name member is set to 'bob'.
s:array:0=mystring
The first element of the array member is set to 'mystring'.
s:sarray:0:name=bob
The name member of the first element of sarray is set to 'bob'.

The REST/JSON interface is accessed through http://device/cp/FunctionName.

spiders
Posts: 9
Joined: Thu Jan 31, 2013 6:39 am

Re: Change (DEFAULT) proftpd settings?

Post by spiders » Wed Apr 02, 2014 4:37 am

Sigh. Well, the debug logs are less than helpful. The cameras that wont connect (dlink and foscam) just send out a QUIT signal without even trying to login. they must not like something about the ftp server. I wish I could figure out what it was....


Here's an odd thing. This particular network does not have internet access (completely isolated). When I was testing it, I had the (foscam) camera and the NAS attached to a firewalled, but internet connected network. They worked just fine together there. As in no ftp problems. I really don't want to expose this internal ipcam network to the internet, even behind a firewall.

Post Reply