home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / インターネット/通信 / netpresenz-4.01.sea / netpresenz-4.01 / NetPresenz-401 / Documentation / Documentation < prev    next >
Text File  |  1996-02-14  |  25KB  |  315 lines

  1. NetPresenz v4.0.1 ゥ 1992-96 Peter N Lewis
  2.  
  3. This program is $10 shareware.
  4.  
  5. NetPresenz was previously called メFTPdモ.  This is the same program, albeit a new version.  If you have a license to FTPd, that license is automatically a license to use NetPresenz (although there is an upgrade fee if you purchased FTPd prior to Jan 1, 1995).
  6.  
  7. NetPresenz is dedicated to werner@rascal for his many years of devotion to the Macintosh Internet community.  You have our thanks!
  8.  
  9. メrave reviews for FTPdモ
  10.     - Australian MacWorld, page 22, June 1993
  11.  
  12. 1994 Derek Van Alstyne Rising Star Award - MacUser December 1994
  13.  
  14. Cool Tools award from Apple - September 1994
  15.  
  16. USENET Macintosh Programmer Award - May 1995
  17.  
  18. Contents
  19.  
  20. What NetPresenz Does
  21. Features
  22. Using NetPresenz Setup
  23. Using NetPresenz
  24. WWW
  25. Gopher
  26. Security Considerations
  27. Remote Site Access Restrictions 
  28. Avoid the Wrath of your Network Admin
  29. Limitations
  30. Small Print
  31. Warranty 
  32. Fine Print 
  33. Acknowledgements 
  34. How It Works 
  35. Version History 
  36.  
  37.  These sections are in the Extra Documentation file.  SimpleText doesnユt handle more than 32k, and I donユt want to rely on any other editor.
  38.  
  39. What NetPresenz Does
  40.  
  41. NetPresenz is a Macintosh implementation of the WWW, Gopher and FTP server protocols.  It should be compatible with most FTP clients, and all WWW and Gopher clients.  Basically it allows your Mac to act as an FTP server so you (and others) can access your files from anywhere around the world.  Obviously there are some serious security considerations you should look into before using this software (see the Security Considerations section).  NetPresenz requires System 7, MacTCP 1.1, and File Sharing enabled. It honours the Users & Groups privileges and passwords, and supports multiple logins, anonymous FTP (user name メanonymousモ or メftpモ), as well as MacBinary and BinHex transfers, and the メMACBモ FTP command.  You can run NetPresenz as a foreground application (displaying the log), or as a background only application (use NetPresenz Setup to toggle between the two).
  42.  
  43. Features
  44.  
  45. Support WWW, Gopher and FTP connections.
  46. Full CGI support.
  47. Multiple simultaneous users.
  48. Honours System 7 Users & Groups (in fact depends on them!).
  49. Supports BinHex and MacBinary transfers.
  50. Supports the MACB command.
  51. Supports Alias resolution for directories and files.
  52. Allows login to other AppleShare servers on the local network.
  53. Allows different formats of a file to be fetched.
  54. Pattern matching in change directory command.
  55. Individual initial directory and commands for any user.
  56. FTP site descriptions sent after login.
  57. Directory descriptions sent after CD command.
  58. Supports the CatSearch feature to allow very fast searches.
  59. Remote site access restrictions.
  60. ISO international character translation.
  61. Allows setting of the owner, group and access permissions.
  62. Allows users to change passwords on all logged in servers.
  63. Supports Scrambled & Two-way passwords.
  64. Supports process control (launching, listing or quitting applications).
  65. Runs in the foreground or the background.
  66.  
  67. Using NetPresenz Setup
  68.  
  69. NOTE: If you have problems logging in, check the Summary window and see if it gives you any clues.
  70.  
  71. NOTE: Some preferences are set with the Internet Config application (these are shared between many different Internet applications, so you only have to set them once and then all supporting applications will use them).  Make sure you run Internet Config at least once and set your personal preferences.  If you donユt save your preferences in Internet Config, NetPresenz will not have any way to map extensions to types and creators and MIME file types, so files transferred using WWW or FTP may not appear correctly.
  72.  
  73. Before you can run NetPresenz, you must be running System 7, with File Sharing turned on, and you must set up File Sharing to give appropriate privileges to users and guests (including enabling guest logins if you want to allow anonymous logins).  For a user or guest to log in, at least one shared folder must be accessible to them.  
  74.  
  75.  
  76. Then you need to run NetPresenz Setup.  Click on each icon in turn and set the configuration as you want it.  For FTP access, you must set the access levels in the FTP Setup window.  For Gopher, you must enable Gopher access and specify the root directory in the Gopher Setup window.  For WWW, you must enable WWW access and specify the root directory in the WWW Setup window.  Also enable CGI scripts if you plan to use them.  Other than that, the defaults will do.
  77.  
  78. By default, NetPresenz will run in the foreground displaying a simple log.  If you wish it to run in the background, choose Background Modeノ from the File menu in NetPresenz Setup, optionally select the copy of NetPresenz to modify, and then click the Background Only checkbox followed by the Set button.
  79.  
  80. FTP Setup
  81.  
  82. There are three types of FTP users:
  83.  
  84. ・ Owner - The Macintosh owner (as defined by the Users & Groups owner name).
  85. ・ User - Anybody with a user name and password set up in the Users & Groups settings.
  86. ・ Guest - Anonymous logins (username of メftpモ or メanonymousモ, any password).
  87.  
  88. and there are four privileges:
  89.  
  90. ・ None - No access.
  91. ・ Read Only - Access to read existing files, but no write access.
  92. ・ Upload - Access to read existing files, and add things to the file system, but not change what is already there (including not overwriting existing files).
  93. ・ Full - Full access to the file system, read/write files, delete files and (empty) directories, rename files.
  94.  
  95. You might also want to set up initial directories for some users.  Use the FTP Users window to do this.  Probably a default for all users will be sufficient, but you can set up each user with their own directory if you want.  The string you type in to NetPresenz Setup is the directory path as seen by the user.  So if you have a shared folder /harddisk/sharedfolder, and the user can only see the sharedfolder, not the harddisk, then the path should be メ/sharedfolderモ.  The owner can usually see the entire volume so you would set the owner path to メ/harddisk/sharedfolderモ.  
  96.  
  97. NOTE: You should probably not set a default directory for the Guest/Anonymous user because some silly clients (particularly clients where FTP is not their main concern, like Netscape and the CompuServe FTP client) donユt deal well with anonymous directories that donユt default to the root.  But then, neither of those actually work with NetPresenz at this time anyway.
  98.  
  99. WARNING: This does not add any security to your site, it simply sets their initial directory, it does not constrain them to that directory.  File Sharing is the place to enforce real security.  All NetPresenz access by the users goes through File Sharing in the same way it would if you logged on from another Mac using the Chooser.  Ensure that this is secure and NetPresenz will be secure.
  100.  
  101. When you have finished setting up the privileges, you can create or edit the files in the メStartup Messagesモ folder (which may reside either in NetPresenzユs folder or in the メNetPresenz Preferences トモ folder in the Preferences folder).  The files in the Startup Messages folder will be returned when the user with that name logs in.  So for example the メPeter Startupモ file will be returned to the user named メPeterモ when he logs in, and the メAnonymous Startupモ file will be returned when a user logs in as either メftpモ or メanonymousモ.  If a file doesnユt exist for the user, the file メDefault Startupモ will be used instead if it exists.  Also, you can put a file メ!Folder Infoモ in any folder and it will be displayed to the user when they change into that directory.  The files should be text-only and will be converted to ISO 8859-1 before being sent.  Note that some clients may not display this information.   NOTE: At most 5k is returned at one time, so restrict your files to reasonable sizes.  If you want to have the file listing of your site available (or any other large file), put the listing into a file, and then refer to that file in your Startup or !Folder Info files.
  102.  
  103. WWW and Gopher Setup
  104.  
  105. The WWW and Gopher servers uses the Guest access of AppleShare to define the visible files and folders.  Both require you to specify the root directory, which is the directory the user will see when connected to your site without specifying a particular path (eg http://yourmac.yoursite.com/).   If you have a shared folder named メsharedfolderモ and a folder named メPubモ, both of which are visible to guests, then type メ/sharedfolder/Pubモ into the Root Directory field.
  106.  
  107. The WWW server does not return directory listings.  When asked for a directory, it returns the file メindex.htmlモ in that directory.  So in the above example, when a user asks for http://yourmac.yoursite.com/, NetPresenz will return the file メHarddisk:sharedfolder:Pub:Index.htmlモ.  Alternatively, if you enable CGI scripts, you can use a CGI script to return a directory listing (or any other information) since NetPresenz will look for various other files like メindex.acgiモ or メindex.cgiモ if it can not find an メindex.htmlモ file.  An example script that returns the directory listing is include in the CGI Examples folder.
  108.  
  109. With Gopher you can use the Gopher Listing menu item to change the names of files, and to add links to other gopher servers.  NetPresenz Setup will let you edit them to change the names, or remove some of the links.  You can also add an index entry, which will let the user find files by specifying part of the name.
  110.  
  111. If you are running NetPresenz on a server or other dedicated Mac, you may prefer to run it in the foreground, instead of as a background only application.  It will get a little more processing time, and be able to display the log file in real time.
  112.  
  113. Using NetPresenz
  114.  
  115. First, make sure that your AppleShare privileges are set up correctly.  Tom Daley reported to me that he had someone try to access his machine within three minutes of first launching NetPresenz!  So donユt think youユll be safe if youユre quick!
  116.  
  117. To use NetPresenz, simply put an alias to it in the Startup Items Folder and launch it.  After that it will run either in the foreground showing the log window, or as a faceless background only application accepting connections.  You can then use any FTP client (like Anarchie or Fetch on Macs, or the standard Un*x ftp program), any Gopher client (like TurboGopher), or any Web browser (like MacWeb or Netscape) to access your Mac.  For information on how to use them, see their respective documentation. 
  118.  
  119. If you are also running NCSA/Telnet, make sure to disable its FTP server or people will (randomly) get either its server or NetPresenz.  You can Quit NetPresenz by launching NetPresenz Setup and holding the option key down while you quit it, or by using ProcessWatcher or AppleScript メtell application "NetPresenz" to quitモ.
  120.  
  121. A log file named メNetPresenz Logモ is kept in the Preferences folder that records who logged in or out and when, as well as what files they put or get.
  122.  
  123. Using NetPresenz from a Un*x FTP Client
  124.  
  125. As an extra feature, if a file メthefileモ (for example) exists on the Mac, then you can issue the following FTP commands to get different formats of that file:
  126.  
  127. get thefile - get the file in the current transfer mode.
  128. get thefile.data - retrieves the data fork (in ASCII or binary).
  129. get thefile.rsrc - get the resource fork of the file (binary mode only).
  130. get thefile.info  - get the info fork of the file (binary mode only)
  131. (the info fork is the same format as the first 128 bytes of the MacBinary file).
  132. get thefile.hqx - get the file after converting it to BinHex format.
  133. get thefile.bin - get the file after converting it to MacBinary format.
  134. (you can also use .mb, .macbin, .macbinary) (binary mode only).
  135.  
  136. Also, you can put BinHex or MacBinary files and they will be converted automatically:
  137.  
  138. put thefile.hqx - put the file after converting it from BinHex format.
  139. put thefile.bin - put the file after converting it from MacBinary format.
  140. (you can also use .mb, .macbin, .macbinary) (binary mode only).
  141.  
  142. Fetch and Anarchie will both transfer in MacBinary format, which means the file will be exactly duplicated from one Mac to the other, so you can ignore all this.
  143.  
  144. NOTE:  All of these examples assume youユre using the standard Un*x FTP client.  If youユre using some other system consult its documentation for the equivalent commands.  Also, when using the Un*x ftp client watch out for usernames with spaces in them ミ if you type メuser fred bloggsモ it thinks the username is fred and the password is bloggs, instead type メuser "fred bloggs"モ.
  145.  
  146. The dir command also support various unix-like flags, including CspFl (for columnar display, display size in k, display directories with a / on the end, and long display), eg:
  147. dir -CF
  148.  
  149. NetPresenz also supports the メMACBモ command, which allows you to get the file in MacBinary mode.
  150.  
  151. quote macb e - turns MacBinary transfer mode on.
  152. quote macb d - turns MacBinary transfer mode off.
  153.  
  154. Remote Volume Mounting
  155.  
  156. To enable access to another file server the appropriate users must have the メRemote Mountingモ enabled in FTP Setup.  By default only the owner can mount volumes.
  157.  
  158. All privileges are contingent on having the appropriate privileges through AppleShare.  Thus if a particular user canユt access a particular volume using AppleShare they wonユt be able to through NetPresenz either (even if you give them Full access).  The same applies for other servers of course.
  159.  
  160. NetPresenz works fine with CAP servers and Netware Macintosh servers, but youユll have to enable Clear Text passwords in the Security window.  This is a slight security flaw, but since the password gets to NetPresenz in plain text, itユs not much worse than normal.
  161.  
  162. If you normally want to have the users able to access a remote server right away then the easiest way to do this is to add an SMNT command in the メLogin Commandsモ of the メDefaultモ entry in FTP Users.  Or you may want to tell the users about being able to mount other servers by putting a note in a メ!Folder Infoモ or Startup Message file.
  163.  
  164. For WWW and Gopher users, you can mount other servers by adding an SMNT command to the Guests user in the FTP Users window.
  165.  
  166. You mount remote AppleShare volumes using the メSMNTモ command like this:
  167.  
  168. quote smnt volume:server@zone:username:password
  169.  
  170. @zone defaults to @*, and the username and password default to your login username and password (this is a slight security risk, but you shouldn't leave any FTP connection unattended any more than you would leave a telnet connection unattended, so it should not be a problem).  So to mount HardDisk on machine TheMac in your zone, using your username and password, you can type:
  171.  
  172. quote smnt HardDisk:TheMac
  173.  
  174. To mount all disks on a Mac named メserverモ in your zone, just type:
  175.  
  176. quote smnt server
  177.  
  178. Miscellaneous FTP Commands
  179.  
  180. Other commands include:
  181.  
  182. quote site u - display current usage stats (memory, connection, users, etc).
  183.  
  184. quote site v - display site statistics (number of logins, total transferred, etc).
  185.  
  186. quote site s - use short (8.3) names.  Looks like a PC (yuck).
  187. quote site l - use long (31 character) names.  Default (much better).
  188.  
  189. quote site h [e or d] - enable/disable adding メ.hqxモ to the end of all files in directory listings.
  190.  
  191. quote site q - quit the server (the user must be the owner).
  192.  
  193. quote site index <search> - list the files that contain <search> in their name.
  194. Caveat: This doesnユt work for AppleShare 2.0.* volumes.  Also, it only uses long (31 character) names, irrespective of the short/long setting.
  195.  
  196. quote site p <password> - change your password.  You must issue this three times in succession without any intervening commands, the first one with your old password as a parameter, and the next two with your new password.  This will change your password on all currently logged in servers.
  197.  
  198. quote site c p <rwxr-x---> <directory> - set the permissions for a directory.
  199. quote site c o <owner> <directory> - set the owner of a directory (the owner name cannot have any spaces in it - sorry).
  200. quote site c g <group> <directory> - set the group of a directory (the group name cannot have any spaces in it).  You can use メnoneモ as a group name to set it to no group.
  201.  
  202. quote site a list - list running processes.
  203. quote site a nlst - list names of running processes.
  204. quote site a oapp crea - launch application with creator type メcreaモ.
  205. quote site a quit crea - quit application with creator type メcreaモ.
  206.  
  207. Also, you can use pattern matching in the cd command.  Eg:
  208.  
  209. cd "/HD/System Folder"
  210. cd /HD/System?Folder/pref*
  211. cd /HD/syst*
  212. cd /HD/Sys*fol*
  213.  
  214. You can use メquote helpモ to find out some information on the other commands.
  215.  
  216. quote help
  217. quote help pass
  218. quote help site
  219. quote help "site f"
  220.  
  221. The multiline response returned by the login command sequence, the cd command and the help command may confuse some old FTP clients.  This feature can be disabled by inserting a dash メ-モ before either your username or password (which means you will have to put an extra dash before any username or passwords which start with a dash, but thatユs probably not a problem :-)
  222.  
  223. WWW
  224.  
  225. NetPresenz supports the widely popular WWW protocol, including full support for CGI scripts written in AppleScript, Frontier, Perl, or various other languages.  You can get several Mac clients for WWW, such as MacWeb, Netscape and Mosaic, from the usual FTP sites.
  226.  
  227. To allow WWW access to your machine you need to enable WWW and configure the root directory in NetPresenz Setupユs WWW Setup window, as well as enabling Guest access via AppleShare.
  228.  
  229. WWW types are determined from the Internet Config file mappings database, so make sure you have configured that correctly.
  230.  
  231. CGI scripts must be applications (so you must save AppleScripts as applets for example).  They also must have a file extension of メ.cgiモ, メ.acgiモ, or メ.fcgiモ.  With メ.cgiモ scripts are executed synchronously (that is, NetPresenz stops processing all other requests until the script responds).  The other two forms are executed asynchronously - NetPresenz asks the script for a response but continues processing other connections while the script executes.  In general you should use メ.acgiモ unless there is a good reason not to.
  232.  
  233. CGI scripts can do lots of cool things, check out the Example CGI Scripts folder for some ideas.  There are lots of other CGI scripts available on the Internet, check out the util/comm/www folder on the UMich archive for lots of interesting scripts.
  234.  
  235. Gopher
  236.  
  237. NetPresenz also supports the Gopher protocol, mainly designed to simplify anonymous FTP.  You can get several Mac clients for Gopher, including TurboGopher, from the usual FTP sites.
  238.  
  239. To allow Gopher access to your machine you need to enable Gopher and configure the root directory in NetPresenz Setupユs Gopher Setup window, as well as enabling Guest access via AppleShare.
  240.  
  241. Gopher types are determined from the Mac file type (you can edit STR# 180 to add other types).
  242.  
  243. You can also add links from your machine to other servers.  Launch NetPresenz Setup, choose Gopher Listingノ and select your gopher directory.  You might also like to add an index entry to the directory - users who connect to your gopher server can use this to search for files by name.
  244.  
  245. Security Considerations
  246.  
  247. メBe afraid.  Be very afraidモ - The Fly
  248.  
  249. Allowing NetPresenz to run on your Mac poses huge security questions.  Some of the same security questions are also posed by System 7 File Sharing.  However with NetPresenz they are much worse because youユre making your Mac accessible to everyone on a world wide network.  Things you definitely should do:
  250.  
  251. Disable guest logins unless you actually need them.  You need guest logins enabled for anonymous FTP, and Gopher or WWW access.
  252.  
  253. If you want a few people to have access, perhaps a better idea than guest login is to give them a single account with a shared password.  This is more secure than guest logins, since no matter how many people they tell the password to, it will always be less than the number of people who could log in as guests.
  254.  
  255. Disable remote mounting to guests or users.  Again, most people donユt need access to volumes other than those directly on your Macintosh (That is the Entire Volume and Shared Folder volumes).  You Definitely Should Not allow access to other volumes on the network if you do not control them, and you Definitely Should inform the administrators of any other servers on the network that you will be allowing access to them so that they can secure their servers as well.
  256.  
  257. Only share a small portion of your file system.  That way you donユt have to worry about the rest of it.  You, as the owner, can still get access to it by using the Users & Groups control panel to turn on the メAllow user to see entire diskモ checkbox for your user.
  258.  
  259. Verify that the file sharing privileges are set correctly.  A good start is to change everything to owned by you and only visible/modifiable by you.  Then change the privileges on areas that you want to give users and guests access.
  260.  
  261. Keep your password secure!  Anyone on the Internet with your username, machine address and password will likely be able to delete every file on your harddisk.  This is a scary thought.  You should be scared.  Donユt give your password out and donユt use an obvious password.  Obvious passwords include, but are not limited to, any of the following patterns (in decreasing obviousness)...
  262. your user name.
  263. your real name.
  264. your initials.
  265. your husbandユs/wifeユs/girlfriendユs/boyfriendユs/dogユs/frogユs/machineユs etc name.
  266. your car licence plate, make, model, etc.
  267. your birthday.
  268. your student/MediCare/social security/tax file/etc number.
  269. any of the above backwards.
  270. any word from a dictionary (especially an electronic dictionary).
  271. Good passwords can be found by making up nonsense words or using
  272. letters from a common saying and by including non-alphanumeric ASCII
  273. characters.
  274.  
  275. Invalid login attempts are logged to a log file in the Preferences folder (assuming logging is enabled).  Check the log file regularly to improve your security.
  276.  
  277. If in doubt, donユt run NetPresenz.  I canユt accept any liability for any problems.  I have done my best to make sure it is secure.  If that is not good enough, donユt use it.  Itユs as simple as that.
  278.  
  279. Avoid the Wrath of your Network Admin
  280.  
  281. FTP can use a lot of bandwidth and so you should check with the system administrators on your network before setting up an FTP site for anything more than personal use.  
  282.  
  283. Also, since NetPresenz can make other servers on the entire AppleTalk Internet available for FTP, you should ensure that the administrators of such machines (including anyone who has File Sharing enabled on their Mac) are aware of this before you allow remote mounting.
  284.  
  285. I canユt accept any responsibility if you use this software in an irresponsible manner (in fact I wonユt accept any responsibility no matter how you use this software!).  As long as you disable remote mounting and donユt try to become the next Info-Mac archive, it shouldnユt be much of a problem, but check with your network administrators anyway.
  286.  
  287. Limitations
  288.  
  289. NetPresenz & NetPresenz Setup require System 7 with File Sharing turned on, MacTCP 1.1 (or later), probably require the 128k ROM (or later).  NetPresenz should work fine with MacTCP 2.0.6 or Open Transport.
  290.  
  291. AutoDoubler users should exclude the folders that are shared with File Sharing.  Also, AutoDoubler causes uploads from the local machine to fail with an I/O Error - uploads from other machines seem to work ok, and itユs useless to upload from the same machine anyway, so this should not be a problem.
  292.  
  293. NetPresenz requires File Sharing or AppleShare which in turn requires AppleTalk.  If you are on a serial network (eg SLIP or PPP), then you may not have an AppleTalk network and you may not want to waste a serial port just to turn AppleTalk on.  You can get around this by using a Dummy network device, one is available from: <FTP://munnari.oz.au//mac/dummy.adev.1.0.hqx>.  This will let you have File Sharing on without any physical network connection.
  294.  
  295. Small Print
  296.  
  297. This program is Shareware, which means if you use it, you must pay for it.  The cost is:
  298.  
  299. Site Licensing:
  300. World-wide license: US$2000
  301. Universities or companies site license: US$500
  302. Curtin University and the University of Western Australia are exempt.
  303. Single-user license: US$10.
  304. Australians may pay in Australian dollars direct to me if they prefer.
  305.  
  306. The upgrade is free if you purchased your copy of FTPd/NetPresenz after January 1, 1995.  Otherwise the upgrade is 50% of the normal price.
  307.  
  308. Use the Register program to fill out the registration form and send it together with your payment to Kagi Shareware, my US distributor.  The address and payment options are shown in the Register program.  You can pay using cash, US$ cheque, or credit card (American Express, VISA or MasterCard).
  309.  
  310. If you purchase a site license, contact me for information on how to make this program automatically set the メI Paidモ flag in the FTP Setup dialog.
  311.  
  312. You may distribute this program any way you wish as long as you donユt charge for it (reasonable download costs such as Compu$erve are ok I guess (although who would call Compu$erveユs download costs reasonable?)).  You must distribute the package in its entirety.  I donユt guarantee any support, but I always answer my Email.  If I donユt answer Email it is because your message didnユt get to me, or my reply bounced, so try again and include a valid Internet address if you can.
  313.  
  314. You MAY NOT DISTRIBUTE this program on any disk or CD without my explicit permission.
  315.