On Tuesday 08 February 2005 21:19, daniel wrote: > but obviously, that fails now. outside of re-enabling PermitRootLogin (not > really an option) is there another option for me? suggestions? comments?
The first way that comes to mind is to copy the files as an unprivileged user, in a directory on the server where this unprivileged user has write access, and then, on the server, use some automatic script/program (that must of course run as root) to automatically move the files to their proper final location. It should not be difficult to write a simple script that monitors a directory and, as soon as it finds some file in it, moves them somewhere else (probably something similar exists already, just google for it). Probably easier is using netcat. It's a very handy utility. Something like the following (very basic, you probably need to adjust and extend it with a little more scripting): ------------- on the server, run as root from the directory where the files should go, do for name in $FILELIST; do nc -l -p 30000 -q 0 > $name done ------------- on the client, run as unprivileged user, do for name in $FILELIST; do cat $name | nc 10.0.0.1 30000 -q 0 done ------------- The above commands assume that the server is at 10.0.0.1, and that the client and the server agree on the list of filenames, that is in the $FILELIST variable; if not, you can send the filelist beforehand using the same technique, and then, once the list is known to the server, proceed with the actual transmission of the files. The documentation for netcat is quite clear and thorough, so read it! HTH -- [email protected] mailing list
