image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old October 6th, 2001, 12:38 PM
Registered User
 
Join Date: Sep 2001
Location: somewhere behind a terminal
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
new32 is on a distinguished road
Getting /etc/motd to show with ftpd

I've set up an anonymous ftp server for something I'm working on and would
just love to be able to inform those just logging in about the terms and
conditions of using the server without having to put a '+README' file in. Normally when one uses ftpd, they will have the contents of /etc/motd show after the log in. However, it just displays "Remote system type is UNIX. Using binary mode to transfer files." I edited motd, reset it's permissions, tweaked everything I could think of but no go. Any help?

--- I've set up the server using the directions listed:

#####START
1) All of step one is done using Terminal, which is located in /Applications/Utilities

note: replace all "user" with your user name or root
(it's more convenient with your user name
because you can easily drop things into
/Users/ftp/pub )

a) First create a directory in /Users that looks like this:

drwxr-xr-x 9 user ftp 262 Nov 1 15:32 ftp

b) Then in /Users/ftp create the following directories:

bin
usr/lib
System/Library/Frameworks/System.framework/Versions/B
pub
incoming

c) Copy the following files to their respective corresponding directories in the ftp directory:

/bin/ls
/usr/lib/dyld
/System/Library/Frameworks/System.framework/Versions/B/System

d) Then, in /Users/ftp: make sure the file permissions look like this:

total 0
dr-xr-xr-x 3 user ftp 58 Oct 4 15:29 System
dr-xr-xr-x 3 user ftp 58 Oct 4 15:30 bin
drwx-wx-wx 10 user ftp 296 Oct 30 02:06 incoming
drwxr-xr-x 6 user ftp 160 Nov 1 01:01 pub
dr-xr-xr-x 3 user ftp 58 Oct 4 15:29 usr

./System:
total 0
dr-xr-xr-x 3 user ftp 58 Oct 4 15:29 Library

./System/Library:
total 0
dr-xr-xr-x 3 user ftp 58 Oct 4 15:29 Frameworks

./System/Library/Frameworks:
total 0
dr-xr-xr-x 3 user ftp 58 Oct 4 15:29 System.framework

./System/Library/Frameworks/System.framework:
total 0
dr-xr-xr-x 3 user ftp 58 Oct 4 15:29 Versions

./System/Library/Frameworks/System.framework/Versions:
total 0
dr-xr-xr-x 3 user ftp 58 Oct 4 15:30 B

./System/Library/Frameworks/System.framework/Versions/B:
total 2408
-r-xr-xr-x 1 root ftp 1231624 Oct 4 15:30 System

./bin:
total 56
-r-xr-xr-x 1 user ftp 26920 Oct 4 15:30 ls

./usr:
total 0
dr-xr-xr-x 3 user ftp 58 Oct 4 15:30 lib

./usr/lib:
total 616
-r-xr-xr-x 1 user ftp 312384 Oct 4 15:30 dyld

note: if you don't know how to change permissions, read the man pages of
chown (type - man chown) for changing file/directory ownership
chgrp (type - man chgrp) for changing file/directory group ownership
chmod (type - man chmod) for changing file directory user/group/other permissions

2) you have to manually create an ftp user using NetInfoManager which is located in /Applications/Utilities

here's how:
open NetInfoManager
under /users create a new directory and label it ftp
then put in the following properties and values:
property | value
-----------------------------------
uid | 21
expire | 0
name | ftp
passwd | *
home | /Users/ftp
change | 0
shell | /dev/null
gid | -21

for passwd, make sure you put an asterix (*) and do not leave it empty, as this will allow the ftp user to login at the login screen of Aqua!
make sure also the shell is /dev/null, or the ftp user will be able to rlogin and telnet in and wreak havoc
##### END
Reply With Quote
  #2  
Old October 6th, 2001, 01:00 PM
Registered User
 
Join Date: Sep 2001
Location: Portland, OR
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
billybob is on a distinguished road
Does your edited MOTD work for non-anonymous ftp? I've never set up anon ftp on my machine and never plan on doing so, but I know that when I edited my MOTD, it showed up in ftp sessions and ssh sessions when i was testing it out.
__________________
everything you know is wrong (and stupid)
Reply With Quote
  #3  
Old October 6th, 2001, 01:16 PM
Registered User
 
Join Date: Sep 2001
Location: somewhere behind a terminal
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
new32 is on a distinguished road
No, it doesn't show up regardless of how I set access to the ftp be I root,
my user, guest, or anon.

I've tried changing permissions for the ~ftp/etc/motd as well as /etc/motd
but alas, the only time I see it is when I start terminal.
Reply With Quote
  #4  
Old October 6th, 2001, 06:40 PM
blb blb is offline
`'
 
Join Date: Apr 2001
Location: CO, USA
Posts: 651
Thanks: 0
Thanked 0 Times in 0 Posts
blb is on a distinguished road
The file /etc/ftpwelcome is shown right after ftp connects, and /etc/ftpmotd is shown after a successful login. The first is mentioned in the ftpd manpage, but the second is incorrectly mentioned as just /etc/motd...oh well.
Reply With Quote
  #5  
Old October 8th, 2001, 11:54 AM
Registered User
 
Join Date: Sep 2001
Location: somewhere behind a terminal
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
new32 is on a distinguished road
I tried that one but then again, I hadn't tried doing ~ftp/etc/ftpmotd and
that worked perfectly. Thanks!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XP Box does not show up in Connect to Server Gnomo Networking & Compatibility 4 December 13th, 2002 12:57 AM
OS X 10.2 PROBLEM: ftpd setting ... please help ! Zeus Mac OS X System & Mac Software 2 September 20th, 2002 11:48 AM
How do I do a manual slide show in iPhoto? msagal Mac OS X System & Mac Software 2 May 15th, 2002 12:09 PM
changing the ftpd port hekal Mac OS X System & Mac Software 5 July 5th, 2001 03:26 PM
anyone understand ftpd in retail yuriwho Mac OS X System & Mac Software 1 March 31st, 2001 10:13 PM


All times are GMT -5. The time now is 06:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.