Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5960983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:54:05+00:00 2026-05-22T18:54:05+00:00

I use Apache’s FTPClient and FTPServer libraries in my Java project. Server and client

  • 0

I use Apache’s FTPClient and FTPServer libraries in my Java project. Server and client are on the same machine.

My FTPServer is supposed to be a local server,nothing related to the Internet. I can connect to the FTPServer from the client(I get 230 as reply code) but i cant seem to do anything. I cant store or retrieve any files.

I read almost every question related to this matter but people who asked other questions were be able to send simple files and had trouble with sending files like pdf etc. I just need to send or retrieve text files.

Any suggestions?

        FTPClient client = new FTPClient();
        String host = "mypc";
        String Name = "user";
        String Pass = "12345";

        client.connect(host);
        client.login(Name,Pass);
        System.out.println("Reply Code: " +client.getReplyCode());


    File file = new File("C:\\.....myfile..txt");

        FileInputStream in = new FileInputStream("C:\\.....myfile..txt");
        boolean isStored = client.storeFile("uploadedfile.txt", in);
        in.close();
        client.logout();
        System.out.println("isStored: " +isStored);

I didnt put the real path names. It returns false,no exceptions etc. This might be because of they’re on the same machine?

Edit: Turned out i needed write permission to send a file to ftpserver. By default, it doesnt give users write permission. How can i give users write permission using Apache’s ftpserver library?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:54:06+00:00Added an answer on May 22, 2026 at 6:54 pm

    Problem Solved:
    This is how to give a user write permission. I added this snippet to server side and it worked.

    List<Authority> auths = new ArrayList<Authority>();
    
    Authority auth = new WritePermission();
    
    auths.add(auth);
    
    user.setAuthorities(auths);
    

    There’s term Authority written in this symbol -> < > after List and ArrayList in the first line. Site doesn’t see words in <> symbol.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking into IKVMing Apache's FOP project to use with our .NET
My Ubuntu server has Apache and Subversion installed. I use this server as a
We use Apache as a reverse proxy server. This has been working well, but
I use apache/passenger on my development machine, but need to add SSL support (something
I use apache commons http client to send data via post every second, is
I'm trying to use Apache::Session::Memcached in an HTML::Mason project where I'm using MasonX::Request::WithApacheSession to
I use Apache POI HSSF API for Java to generate a long long report
Trying to use Apache POI in a Eclipse JSP project. The POI jar is
Is it possible to use Apache Subversion (SVN) as general purpose backup tool? (As
I'm trying to create a self signed certificate for use with Apache Tomcat 6.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.