Find the answer to your Linux question:
Results 1 to 10 of 10
hi everybody, How cud i stop downloading files from FTP and allow uploading files in FTP. Thanks & reg,...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    26

    Post restrict file download not upload


    hi everybody,

    How cud i stop downloading files from FTP and allow uploading files in FTP.

    Thanks & reg,
    Last edited by utpalsarkar; 03-14-2009 at 02:57 PM. Reason: greetings

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    You need to be more specific please, are you running an FTP server or something? What exactly are you attempting to do here?
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Posts
    26
    hi Mike,

    Thanks 4 response.

    In my ftp I want 2 allow any user or particular user to upload the file but don't want to allow download the files.

    Is it possible ? plz help me.

    Thanks,

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Sep 2004
    Location
    UK
    Posts
    161
    Don't know is any FTPD does that. Your going to have to view the situation as a learning experience/opportunity, Download the source for vsftpd or other and disable the mget and get command(s), should be realitively easy.
    In a world without walls and fences, who needs Windows and Gates?

  6. #5
    Just Joined!
    Join Date
    Jan 2008
    Posts
    26

    Smile

    actually i faced this question in an interview

    regards,

  7. #6
    Just Joined!
    Join Date
    Jan 2008
    Posts
    26
    i have one more question i.e.
    I want to restrict file upload/download size in ftp. i.e. file more thank 10mb could not be uploaded or downloaded also. If this is possible, please let me know.

    Thanks & regards,

  8. #7
    Just Joined!
    Join Date
    Oct 2008
    Location
    Cochin
    Posts
    12

    upload-only directory

    You can use the <Limit> directive for this in the FTP configuration file :
    -----------------------------------------------------------
    <Directory /path/to/uploads>
    <Limit ALL>
    DenyAll
    </Limit>

    <Limit CDUP CWD XCWD XCUP>
    AllowAll
    </Limit>

    <Limit STOR STOU>
    AllowAll
    </Limit>
    </Directory>
    ---------------------------------------------------------
    The first <Limit ALL> section blocks use of all FTP commands within the /path/to/uploads directory. Having denied use of all commands, we then proceed to define which commands can be used. The CDUP and CWD commands (and their X variants) should be allowed so that clients can change into and out of the directory. Next, STOR and STOU are allowed, so that clients can actually upload files into the directory (assuming that the filesystem permissions allow for the client to write files in the directory as well). The WRITE command group might have been used, but that also allows things like creating and deleting subdirectories, which is usually not wanted in an upload-only configuration.

    Reference : ProFTPD mini-HOWTO - Configuring <Limits>

  9. #8
    Just Joined!
    Join Date
    Oct 2008
    Location
    Cochin
    Posts
    12
    Well, u didnt specify what FTP server you are running..

  10. #9
    Just Joined!
    Join Date
    Jan 2008
    Posts
    26
    Its vsftp is running on my server.

    Thanks,

  11. #10
    Linux Newbie
    Join Date
    Sep 2004
    Location
    UK
    Posts
    161
    Try playing with anon_umask and local_umask (eg make all the uploaded files non-readable ie premissions = 0000), the directory can be RW but the server should change the premissions after an upload so files are never readable. Never tried it but that looks like a logical use of the anon_umask and local_umask parameters.

    See man vsftpd.conf
    In a world without walls and fences, who needs Windows and Gates?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •