Create file in TFTP server - file-io

I have a requirement like this. Log files has to be created in TFTP server in Ubuntu. I am using this TFTP version (tftp-hpa 0.49).
The only problem here is, the log file which i am dumping into the TFTP server has to be present already. If the file is not present already, i am unable to create the log file. My requirement is to create log files dynamically in TFTP server.
Please let me know, is there any way to achieve my requirement.

edit
/etc/default/tftpd-hpa
adding the option --create to the variable TFTP_OPTIONS=
--create:
Allow new files to be created. By default, tftpd will only allow upload of files that
already exist. Files are created with default permissions allowing anyone to read or write
them, unless the --permissive or --umask options are specified.

Related

How to upload set of all the files in folder on flowForce server using system ftp store method?

I have setup flow force server in my local pc and I was able to run couple of sample jobs. Then I try to setup FTP store job by providing required details. I was also able to upload specific file in to FTP server as well.
But now I need to know whether there is a possibility to upload all the files in particular folder in to target folder in FTP server. Appreciate if someone who have knowledge above flowforce server can share their thoughts about this.

DavLockDB: what do we need it for?

I configured a webDAV to be able to upload files onto server. All is well, but what exactly does the DavLockDB do?
Apache stores locking information when calling LOCK, and UNLOCK in the file specified in this configuration setting.

Is it possible to rename a file on FTP server programmatically using cocoa?

My basic requirement is to add a ".temp" suffix to a file while it is getting uploaded on to the FTP server (suffix should be only for time until the file is fully uploaded).
As per my understanding, i thought this could be achieved by: Add a suffix to file on the local machine, then upload it and after the upload is complete, rename the file to remove suffix on server.
But now the another problem is that i could not found a way to rename a file on FTP server using cocoa. I know renaming a file is feasible using Java or other languages but i want to achieve the same in objectiveC.
Please tell be if the above task is feasible and if it is what is the approach i should follow?
FYI: I know how to upload and download a file on FTP server using NSInputStream and NSOutputStream.
Thanks. I'd appreciate any help.
Take a look at CFNetwork FTP docs. They do not mention exactly your case, but there may be a way to sent RNFR and RNTO commands over the stream.
https://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/CFFTPTasks/CFFTPTasks.html#//apple_ref/doc/uid/TP30001132-CH9-SW1
There is also a sample project you can look into:
https://developer.apple.com/library/ios/samplecode/SimpleFTPSample/Listings/Read_Me_About_SimpleFTPSample_txt.html
This library claims to do what you want (rename remote files)
http://www.chilkatsoft.com/ftp-objc.asp

HSQLDB 2.2.9: understanding server.properties file

I am running hsqlddb 2.2.9 on ubuntu Linux but I am struggling to understand the server.properties file. With hsqldb installed under /usr/local, when I start the server with java org.hsqldb.server.Server from the place I put the server.properties file, suppose server.properties is:
server.database.0=file:/usr/local/hsqldb-2.2.9/hsqldb/hibernate/hiberdb
server.dbname.0=hiberdb
Then I get a subdirectory hibdernate with everthing in it labeled
hibderdb.{log,script,properties,tmp}
with hibderdb.tmp an empty directory. So far so good.
However I cannot understand hyper sql db's logic in the following cases:
Suppose server.properties is:
server.database.0=file:/usr/local/hsqldb-2.2.9/hsqldb/hibernate
server.dbname.0=hiberdb
then the hibderdb alias is ignode and I get files
hibernate.{log,properties,script,tmp}
in the same directory as the server.properties file (i.e. in the current directory).
or even the following:
server.database.0=file:/usr/local/hsqldb-2.2.9/hsqldb/hibernate/
server.dbname.0=hiberdb
then all I get is a hibernate subdirectory with no hibderdb.* files and instead I have files
hibernate/{.log,.properties,.script,.tmp}
(these are hidden Unix files, and again the alias property dbname is ignored).
The HSQLDB documentation has an example:
http://hsqldb.org/doc/2.0/guide/listeners-chapt.html#lsc_server_props
server.database.1=file:/opt/db/mydb
server.dbname.1=enrolments
Is this example outdated or wrong?
Thanks,
Jason Posit
The server.dbname.0=hiberdb is totally unrelated to the other line in the properties file.
This 'alias' is used when accessing the server from a client.
The example in the documentation is correct. The external database client is dealing with a database alias it knows as 'enrolments', and does not need to know where you store the files on your server.
Access to your 'hiberdb' client is always via the URL such as jdbc:hsqldb:hsql://localhost/hiberdb no matter where you put the files.

How to change permissions on ftp file in rebol?

What's the function's name to change this permission on ftp file (ftp software can do it so I guess Rebol can too)?
FTP has two ports open, one for commands and one for data transfer. Since you only want to issue a command, then you don't need to use ftp, but can use the telnet protocol.
The ftp protocol in Rebol2 does not support site specific commands such as chmod. However, I have written my own ftp protocol for Rebol3, ( see http://github.com/gchiu/Rebol3/tree/master/protocols/ ), and it looks like it is only a few lines to add the SITE command.
The REBOL function for changing file permissions is set-modes.
However, that is enabled only for local files -- so no equivalent of chmod for remote files using FTP.
This thread suggests it may be possible to modify REBOL's FTP scheme to make it possible....
http://www.rebol.org/ml-display-thread.r?m=rmlSWGQ
....But, as far as I know, no one has.