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

  • Home
  • SEARCH
  • 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 8848971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:31:49+00:00 2026-06-14T12:31:49+00:00

I have been tasked with setting up a centOS 6.2 development box (even though

  • 0

I have been tasked with setting up a centOS 6.2 development box (even though I do not know linux) and am currently using vsftpd to FTP into a box at work. The problem is sftp is not working.

Authentication failed. Error: Critical error Error: Could not connect
to server

this is the error I am getting.

I have added the user by doing the following:

sudo useradd -d /var/www/PATH -s /usr/sbin/nologin USERNAME
sudo passwd USERNAME

sudo chown -R USERNAME /var/www/ PATH 
sudo chmod 755 /var/www/PATH

it works for ftp (and the folder structure is jailed) but it does not work with sftp.

However, when I add a user the following way:

sudo useradd USERNAME
sudo passwd USERNAME
sudo chown –R USERNAME /opt/USERNAME
sudo chmod 777 /opt/USERNAME

I have sftp access unjailed and no FTP access.

It does not matter if I have to create multiple accounts (one for ftp and one for sftp), they do have to be jailed to the directory.

If there is a better solution to my problem, help would be welcomed!

Thanks,

Matt

  • 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-06-14T12:31:50+00:00Added an answer on June 14, 2026 at 12:31 pm

    You are on good way.

    Personally I am using chrooting of sftp user described here: http://www.thegeekstuff.com/2012/03/chroot-sftp-setup/

    IMHO in article is not stressed out enough that user’s home directory has to be owned by root

        # ls -ld /var/www/PATH
        drwxr-xr-x 3 root root 4096 Dec 28 23:49 /var/www/PATH
    

    You can get a lot of helpful info from logs, it this case you can search

        tail -f /var/log/secure
    

    while connecting from external host.

    Let me know if you have any more help with this problem.

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

Sidebar

Related Questions

I have been tasked to develop an interactive website using java & mysql: using
I have been tasked with writing an ADP application using Access. The back-end data
I have been tasked with maintaining a legacy unmanaged c++ system. I do not
I've been tasked with setting up an automated system that will have to do
I have been using PHP for a while but I am not too too
For my day job, I have been tasked with setting up a computer system
I have been tasked with setting up a server for running JBoss presumably the
I have been tasked with setting up a flat-file SKU database for use on
At my new company I have been tasked with setting up and presenting TFS
I am using windows 2003R2 VisualSVNServer installs and works easily. I have been tasked

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.