Re: FTP Restricted Access

From: Muthyam Reddy (MREDDY_at_JOY.COM)
Date: 12/02/03

  • Next message: Bob Booth - UIUC: "Re: FTP Restricted Access"
    Date:         Tue, 2 Dec 2003 16:07:54 -0500
    To: aix-l@Princeton.EDU
    
    

    ** High Priority **

    I got these steps to limit FTP user from aix-mailing list.....it works fine.
    Yu can make few modifications based on requirements.

    Below are the steps Yu need to do

       1. Create a non-administrative group called ftp

       2. Create a user named ftp. The only things that need
           to be set are the user name (ftp), login user (false),
           user can rlogin (false), another user can SU to user (false),home
    directory (/u/ftp), and primary group (ftp). Setting these attributes to
    false makes that user available or ftp's only. Everything else is
    your option such as max CPU, max file size, etc...

           The home directory can really be anything, for example /u/ftp

        3. \# mkdir /u/ftp/bin /u/ftp/etc /u/ftp/pub

        4. \# cp /bin/ls /u/ftp/bin
            \# chmod 111 /u/ftp/bin/ls
            \# chmod 111 /u/ftp/bin
            \# chown root /u/ftp/bin

            The 4th step sets up /u/ftp/bin: Make a copy of the ls
    program, make sure ls can't be changed, make directory execute-only, and
    make sure root owns the directory.

         5. \# sed -e 's/:[\^:]*:/:*:/' /etc/passwd > /u/ftp/etc/passwd
             \# sed -e 's/:[\^:]*:/:*:/' /etc/group > /u/ftp/etc/group
             \# chmod 444 /u/ftp/etc/*
             \# chmod 111 /u/ftp/etc
             \# chown root /u/ftp/etc

              The 5th step sets up /u/ftp/etc: Make a copy of /etc/passwd
    with all passwords changed to asterisks, make a copy of /etc/group,
    make sure files in etc are not writeable, make directory execute-only, and
    make sure root owns the directory.

         6. \# chmod 1777 /u/ftp/pub
             \# chown ftp /u/ftp/pub
             \# chgrp ftp /u/ftp/pub

            The 6th step sets up /u/ftp/pub: Make directory writeable by
    anyone and make sure ftp owns the directory.

          7. \# chmod 555 /u/ftp
              \# chown root /u/ftp

          Step 7 secures the ftp directory.

            pub is the directory set aside for users to put and get
    files to and from in /home directory /u/ftp.

    With this setup, anyone logged in as ftp in an ftp session will perceive
    /u/ftp as '/'. In other words, nothing exists to that user lower in the
    tree than /u/ftp. The user can only see files (with the current setup) in
    /u/ftp/bin, /u/ftp/lib, and /u/ftp/pub. These will appear to the user as
    /bin, /lib, and /pub respectively.

    This account can also be accessed with the "anonymous" account. The user HAS
    to be named ftp or anonymous.

    >>> LewisC@AAFES.COM 12/02/03 02:48PM >>>
    I am trying to determine the best way to restrict a users access with FTP. I only want them to be able to get files from one particular directory and not be able to cd anywhere else on the system.

    Any suggestions?

    Tks
    Tina Lewis
    Army and Air Force Exchange Service

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    This electronic mail transmission contains information from Joy Mining Machinery
    which is confidential, and is intended only for the use of the proper addressee.
    If you are not the intended recipient, please notify us immediately at the return
    address on this transmission, or by telephone at (724) 779-4500, and delete
    this message and any attachments from your system. Unauthorized use, copying,
    disclosing, distributing, or taking any action in reliance on the contents of
    this transmission is strictly prohibited and may be unlawful.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <<privacy>>


  • Next message: Bob Booth - UIUC: "Re: FTP Restricted Access"

    Relevant Pages

    • Re: .wav files and FTP question
      ... original files by a physical master but the business ... It's possible for a FTP program to transmit a partial file. ... incomplete transmission, or a positive response indicating a complete ... In the case of a hung connection, I've had to force the FTP transfer to end. ...
      (rec.audio.pro)
    • Biztalk 2006 R2 FTP Adapter
      ... Transmissions will randomly fail when sending files via the FTP ... BizTalk FTP adapter log shows connection and transmission. ...
      (microsoft.public.biztalk.general)
    • Re: Temporary file in FTP
      ... been pick up by the 3rd party software. ... >I am running IIS 5.0 on DMZ for ftp receiving files, ... During transmission the file is present on directory while ... >growing dimension but third-party software consider this file just closed ...
      (microsoft.public.inetserver.iis.ftp)
    • Re: java ftp library
      ... > transfer files between nodes. ... > and client at the same time. ... > parallel transmission and requesting of files ... There must be dozens of FTP utilities out there now, ...
      (comp.lang.java.programmer)
    • Re: FTP continuation character
      ... > FTP client) to a Windows machine (acting as FTP server). ... This electronic transmission (including any ... delivering some or all of this transmission to an intended recipient, ...
      (bit.listserv.ibm-main)