Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* FTP issue
@ 1996-10-02  4:00 aaron smith
  1996-10-07  4:00 ` Robin Shahan
  0 siblings, 1 reply; 7+ messages in thread
From: aaron smith @ 1996-10-02  4:00 UTC (permalink / raw)
  Cc: aaron.smith


I have DEC alpha system running DEC UNIX 3.2c. I have configured it
for anonymous FTP which locks the user in the ftp directory structure
I have defined. Ninety percent of the users accounts are locked and
have no direct access to the filesystem. I have some users which need
direct access to the system via telnet and ftp. Since they are not
administrative users I have implemented the restricted shell
(/usr/bin/Rsh). I have noticed that when the user accesses the system
via telnet, the user is truely restricted to their home directory but
when the system is accessed by ftp, the user has the ability to go
outside his home directory. How can I prevent this from an FTP stand
point? I realize that I can set the permissions of various directories
and files so that they are not world read/writeable and modify groups,
but this is not practical especially since I do know the correct
permissions for every single file in the unix universe. So how should
I approach this issue? Please email your comments to
aaron.smith@ssc.sniemens.com as I have upgraded to sendmail8.7.6 and
some things are not working correctly.

Major Thanks
Aaron



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FTP issue
  1996-10-02  4:00 FTP issue aaron smith
@ 1996-10-07  4:00 ` Robin Shahan
  1996-10-10  4:00   ` Bryon Nicoson
  0 siblings, 1 reply; 7+ messages in thread
From: Robin Shahan @ 1996-10-07  4:00 UTC (permalink / raw)




In article <32530C5E.631F@sieweb.com>, aaron smith <aaron@sieweb.com> writes:
|>I have DEC alpha system running DEC UNIX 3.2c. I have configured it
|>for anonymous FTP which locks the user in the ftp directory structure
|>I have defined. Ninety percent of the users accounts are locked and
|>have no direct access to the filesystem. I have some users which need
|>direct access to the system via telnet and ftp. Since they are not
|>administrative users I have implemented the restricted shell
|>(/usr/bin/Rsh). I have noticed that when the user accesses the system
|>via telnet, the user is truely restricted to their home directory but
|>when the system is accessed by ftp, the user has the ability to go
|>outside his home directory. How can I prevent this from an FTP stand
|>point? I realize that I can set the permissions of various directories
|>and files so that they are not world read/writeable and modify groups,
|>but this is not practical especially since I do know the correct
|>permissions for every single file in the unix universe. So how should
|>I approach this issue? Please email your comments to
|>aaron.smith@ssc.sniemens.com as I have upgraded to sendmail8.7.6 and
|>some things are not working correctly.
|>
|>Major Thanks
|>Aaron
|>

I don't know how to do this in the Unix environment. In the VMS environment,
we found that our clients, who had Restricted and Captive accounts, could FTP
into our machine and see anything with world access, despite the Restricted/
Captive settings on their accounts. 

To get around it, we implemented Anonymous FTP, which allows someone to FTP
in using the account ANONYMOUS, and restricts them to the ANONYMOUS directory.
Then we put an Access Control List on the executable for incoming FTP
(ucx$ftpc.exe), and only gave that access to the ANONYMOUS account.

Anybody with SYSPRV or BYPASS priv can get around this, but it *did* resolve
the problem with our non-privileged users. I don't know what the equivalent
solution is on the Unix side, but I hope this helps...

Robin E. Shahan
resh@chevron.com
My opinions, not Chevron's.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FTP issue
  1996-10-10  4:00   ` Bryon Nicoson
@ 1996-10-10  4:00     ` Bryon Nicoson
  1996-10-15  4:00       ` axbergk
  1996-10-11  4:00     ` Dave Wotton
  1996-10-11  4:00     ` Don Melano
  2 siblings, 1 reply; 7+ messages in thread
From: Bryon Nicoson @ 1996-10-10  4:00 UTC (permalink / raw)
  To: aaron.smith

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

Bryon Nicoson wrote:
             ^cut out all of the previous message and then

Attached are instructions for installing anonymous ftp on dunix.  I
received these from DEC Support today.

[-- Attachment #2: temp --]
[-- Type: text/plain, Size: 2361 bytes --]

----------------------------------------------------------------------------
             Instructions for adding anonymous ftp to OSF.
---------------------------------------------------------------------------

Step 1:
   Use the "adduser" utility to add a new user called ftp.
   The new user, ftp, should belong to the group ftp.  When
   prompted for the group that ftp should be in, answer ftp.
   Adduser will then prompt you if it should create the new
   group, answer "yes".  The new user, ftp, should have a home
   directory of /usr. The default shell is fine, you will be
   modifying it.

   The new passwd should be set to "anonymous".

   After the adduser script has run, the newly created account
   has an entry in the /etc/passwd file such as:

   
   ftp:mEFyvztssXGZk:269:79:anonymous ftp:/usr/ftp:/bin/csh

   The encoded passwd and uid will most likey be different at your
   site.

   Next, edit /etc/passwd and modify the new users login shell for
   /usr/ucb/ftp. The changed entry will look like:

   ftp:mEFyvztssXGZk:269:79:anonymous ftp:/usr/ftp:/usr/ucb/ftp

Step 2:
   Now that you have created the new ftp account, you will need
   to setup some new directories in it.

   1) cd /usr/ftp
   2) mkdir etc pub (if bin does not exist, the create it)
   3) cp /sbin/ls /usr/ftp/bin
   4) cp /etc/passwd /usr/ftp/etc
   5) cp /etc/group /usr/ftp/etc
   6) cp /etc/svc.conf /usr/ftp/etc
   7) chown -R ftp *
   8) chown ftp /usr/ftp
   9) chmod -w /usr/ftp
   10) chmod 111 /usr/ftp/bin/ls
   11) chmod -w /usr/ftp/bin
   12) chmod 444 /usr/ftp/etc
   13) chmod -w /usr/ftp/etc
   14) chmod 777 /usr/ftp/pub (this will enable writing)

Step 3:
   This concludes the anonymous ftp setup.  Any files that you wish the
   public to read will go in /usr/ftp/pub.

Step 4: 

   Testing:

   ftp to the host that you just created the anonymous ftp account:

   In my example, my hosts is called twonix.

   csh>ftp twonix
   Connected to nodename.cxo.dec.com.
   220 nodename.cxo.dec.com FTP server (Version 4.1 Sun Mar 25 18:16:27 EST
   1990) ready.
   Name (nodename::username): anonymous
   Password:anonymous
   230 Guest login ok, access restrictions apply.
   ftp>cd pub
   ftp>   


    
Please contact the Customer Support Center if you have any questions on this
procedure or need further assistance in any way.

Thankyou.
    


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FTP issue
  1996-10-07  4:00 ` Robin Shahan
@ 1996-10-10  4:00   ` Bryon Nicoson
  1996-10-10  4:00     ` Bryon Nicoson
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bryon Nicoson @ 1996-10-10  4:00 UTC (permalink / raw)
  To: aaron


Robin Shahan wrote:
> 
> In article <32530C5E.631F@sieweb.com>, aaron smith <aaron@sieweb.com> writes:
> |>I have DEC alpha system running DEC UNIX 3.2c. I have configured it
> |>for anonymous FTP which locks the user in the ftp directory structure
> |>I have defined. Ninety percent of the users accounts are locked and
> |>have no direct access to the filesystem. I have some users which need
> |>direct access to the system via telnet and ftp. Since they are not
> |>administrative users I have implemented the restricted shell
> |>(/usr/bin/Rsh). I have noticed that when the user accesses the system
> |>via telnet, the user is truely restricted to their home directory but
> |>when the system is accessed by ftp, the user has the ability to go
> |>outside his home directory. How can I prevent this from an FTP stand
> |>point? I realize that I can set the permissions of various directories
> |>and files so that they are not world read/writeable and modify groups,
> |>but this is not practical especially since I do know the correct
> |>permissions for every single file in the unix universe. So how should
> |>I approach this issue? Please email your comments to
> |>aaron.smith@ssc.sniemens.com as I have upgraded to sendmail8.7.6 and
> |>some things are not working correctly.
> |>
> |>Major Thanks
> |>Aaron
> |>
> 
> I don't know how to do this in the Unix environment. In the VMS environment,
> we found that our clients, who had Restricted and Captive accounts, could FTP
> into our machine and see anything with world access, despite the Restricted/
> Captive settings on their accounts.
> 
> To get around it, we implemented Anonymous FTP, which allows someone to FTP
> in using the account ANONYMOUS, and restricts them to the ANONYMOUS directory.
> Then we put an Access Control List on the executable for incoming FTP
> (ucx$ftpc.exe), and only gave that access to the ANONYMOUS account.
> 
> Anybody with SYSPRV or BYPASS priv can get around this, but it *did* resolve
> the problem with our non-privileged users. I don't know what the equivalent
> solution is on the Unix side, but I hope this helps...
> 
> Robin E. Shahan
> resh@chevron.com
> My opinions, not Chevron's.

I am experiencing the same problem Aaron described.  From my reading of
the documentation and man pages (and familiarity with other ftps on
other unixes), it seems that anonymous is built in and is supposed to 
automagically default to the ftp user account's home directory as 
specified in the passwd file (read the ftpd man pages for info on
setting up ftp's home dir).  It states that the ftp program will execute
a chroot to this directory upon anonymous login.  I have set it up and,
it ain't happening.  I can ftp anonymously and take a copy of
/etc/passwd or whatever else I might want.  In fact, in my setup, it
doesn't even start the user in the ftp home dir -- it starts at root.
:'<

I'm sure there is a simple solution and I am going to log a call with
DEC after browsing around a little longer out here.

Aaron, I'll let you know what I find out.  Please notify me if you
discover anything.

Thanks,          ?    
Bryon Nicoson    0/
bnico@ice.net   /|
                 >>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FTP issue
  1996-10-10  4:00   ` Bryon Nicoson
  1996-10-10  4:00     ` Bryon Nicoson
@ 1996-10-11  4:00     ` Dave Wotton
  1996-10-11  4:00     ` Don Melano
  2 siblings, 0 replies; 7+ messages in thread
From: Dave Wotton @ 1996-10-11  4:00 UTC (permalink / raw)
  To: bnico


Bryon Nicoson <bnico@ice.net> wrote:

[ snip - quoting other articles ]

>I am experiencing the same problem Aaron described.  From my reading of
>the documentation and man pages (and familiarity with other ftps on
>other unixes), it seems that anonymous is built in and is supposed to 
>automagically default to the ftp user account's home directory as 
>specified in the passwd file (read the ftpd man pages for info on
>setting up ftp's home dir).  It states that the ftp program will execute
>a chroot to this directory upon anonymous login.  I have set it up and,
>it ain't happening.  I can ftp anonymously and take a copy of
>/etc/passwd or whatever else I might want.  In fact, in my setup, it
>doesn't even start the user in the ftp home dir -- it starts at root.
>:'<


On my Solaris box, if the home directory for the ftp user ( as defined in 
the real password file ) doesn't exist, perhaps as a result of a typing 
error, then the anonymous user defaults to the real / directory. Perhaps 
this is your problem.

Dave.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FTP issue
  1996-10-10  4:00   ` Bryon Nicoson
  1996-10-10  4:00     ` Bryon Nicoson
  1996-10-11  4:00     ` Dave Wotton
@ 1996-10-11  4:00     ` Don Melano
  2 siblings, 0 replies; 7+ messages in thread
From: Don Melano @ 1996-10-11  4:00 UTC (permalink / raw)



Bryon Nicoson wrote:
> 
> Robin Shahan wrote:
> >
> > In article <32530C5E.631F@sieweb.com>, aaron smith <aaron@sieweb.com> writes:
> > |>I have DEC alpha system running DEC UNIX 3.2c. I have configured it
> > |>for anonymous FTP which locks the user in the ftp directory structure
> > |>I have defined. Ninety percent of the users accounts are locked and
> > |>have no direct access to the filesystem. I have some users which need
> > |>direct access to the system via telnet and ftp. Since they are not
> > |>administrative users I have implemented the restricted shell
> > |>(/usr/bin/Rsh). I have noticed that when the user accesses the system
> > |>via telnet, the user is truely restricted to their home directory but
> > |>when the system is accessed by ftp, the user has the ability to go
> > |>outside his home directory. How can I prevent this from an FTP stand
> > |>point? I realize that I can set the permissions of various directories
> > |>and files so that they are not world read/writeable and modify groups,
> > |>but this is not practical especially since I do know the correct
> > |>permissions for every single file in the unix universe. So how should
> > |>I approach this issue? Please email your comments to
> > |>aaron.smith@ssc.sniemens.com as I have upgraded to sendmail8.7.6 and
> > |>some things are not working correctly.
> > |>
> > |>Major Thanks
> > |>Aaron
> > |>
> >


You might take a look at the wu-ftp package thats available on the net. 
It allows you to specify a user as a guest, and this makes the wu-ftpd
daemon do a chroot to a directory that you specify.

-- 
Don Melano			Mail: dmelano@tspi.elan.af.mil
Computer Sciences Corp.
Advanced Technology Divison
Edwards Air Force Base, Flight Test Center, CA.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FTP issue
  1996-10-10  4:00     ` Bryon Nicoson
@ 1996-10-15  4:00       ` axbergk
  0 siblings, 0 replies; 7+ messages in thread
From: axbergk @ 1996-10-15  4:00 UTC (permalink / raw)



In article <325D602F.1DBBEFD9@ice.net>, Bryon Nicoson <bnico@ice.net> wrote:
>This is a multi-part message in MIME format.
>
>--------------52E45C031267F1E9722798D4
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>Bryon Nicoson wrote:
>             ^cut out all of the previous message and then
>
>Attached are instructions for installing anonymous ftp on dunix.  I
>received these from DEC Support today.
>
>--------------52E45C031267F1E9722798D4
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline; filename="temp"
>
>----------------------------------------------------------------------------
>             Instructions for adding anonymous ftp to OSF.
>---------------------------------------------------------------------------
>
>Step 1:
>   Use the "adduser" utility to add a new user called ftp.
>   The new user, ftp, should belong to the group ftp.  When
>   prompted for the group that ftp should be in, answer ftp.
>   Adduser will then prompt you if it should create the new
>   group, answer "yes".  The new user, ftp, should have a home
>   directory of /usr. The default shell is fine, you will be
>   modifying it.
>
>   The new passwd should be set to "anonymous".
>
>   After the adduser script has run, the newly created account
>   has an entry in the /etc/passwd file such as:
>
>   
>   ftp:mEFyvztssXGZk:269:79:anonymous ftp:/usr/ftp:/bin/csh
>
>   The encoded passwd and uid will most likey be different at your
>   site.
>
>   Next, edit /etc/passwd and modify the new users login shell for
>   /usr/ucb/ftp. The changed entry will look like:
>
>   ftp:mEFyvztssXGZk:269:79:anonymous ftp:/usr/ftp:/usr/ucb/ftp
>
>Step 2:
>   Now that you have created the new ftp account, you will need
>   to setup some new directories in it.
>
>   1) cd /usr/ftp
>   2) mkdir etc pub (if bin does not exist, the create it)
>   3) cp /sbin/ls /usr/ftp/bin

>   4) cp /etc/passwd /usr/ftp/etc
>   5) cp /etc/group /usr/ftp/etc
>   6) cp /etc/svc.conf /usr/ftp/etc

DEC is telling you to copy your original system passwd, group, and svcs file 
to the ftp environment?  WOW!!!  Please do not do this!  There is a good Anon 
FTP FAQ available on the net, as well as a Wuftpd FAQ and software available.
This is a much more secure anon ftp pkg than the instructions above.  
Especially from the looks of your passwd file.....no shadow file?  
Get the FAQ...it is at ftp.iss.net. or just do a search for anon ftp

Kris

>   7) chown -R ftp *
>   8) chown ftp /usr/ftp
>   9) chmod -w /usr/ftp
>   10) chmod 111 /usr/ftp/bin/ls
>   11) chmod -w /usr/ftp/bin
>   12) chmod 444 /usr/ftp/etc
>   13) chmod -w /usr/ftp/etc
>   14) chmod 777 /usr/ftp/pub (this will enable writing)
>
>Step 3:
>   This concludes the anonymous ftp setup.  Any files that you wish the
>   public to read will go in /usr/ftp/pub.
>
>Step 4: 
>
>   Testing:
>
>   ftp to the host that you just created the anonymous ftp account:
>
>   In my example, my hosts is called twonix.
>
>   csh>ftp twonix
>   Connected to nodename.cxo.dec.com.
>   220 nodename.cxo.dec.com FTP server (Version 4.1 Sun Mar 25 18:16:27 EST
>   1990) ready.
>   Name (nodename::username): anonymous
>   Password:anonymous
>   230 Guest login ok, access restrictions apply.
>   ftp>cd pub
>   ftp>   
>
>
>    
>Please contact the Customer Support Center if you have any questions on this
>procedure or need further assistance in any way.
>
>Thankyou.
>    
>
>
>--------------52E45C031267F1E9722798D4--
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1996-10-15  4:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-10-02  4:00 FTP issue aaron smith
1996-10-07  4:00 ` Robin Shahan
1996-10-10  4:00   ` Bryon Nicoson
1996-10-10  4:00     ` Bryon Nicoson
1996-10-15  4:00       ` axbergk
1996-10-11  4:00     ` Dave Wotton
1996-10-11  4:00     ` Don Melano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox