iMarc | Interactive Media Architects
  • Portfolio
  • Process
  • About
  • Communiqué
  • Contact
  • Support
  • Search

scponly, the Alanis Morissette of FreeBSD ports.

by Dave Tufts - February 8, 2007 / 4:03pm View more articles

scponly is ironic

iMarc has abandoned the insecure FTP, in favor of SFTP. On our FreeBSD systems, we implement a port called scponly for users to transfer files over SFTP in a chroot'ed environment, without giving them SSH or terminal access.

Even though the port is called scponly, is also supports SFTP. In fact, I've only tested it using SFTP, not scp. Normally, it's very easy to set up.

However, on a new FreeBSD 6.2 server, we ran into some problems. We had one working scponly server (running FreeBSD 5.x) and a broken scponly installation running on the 6.2 server. The broken installation would allow scponly connections, but immediately drop them before transfer. To test, we turned error reporting up to eleven and manually pushed a file to each server using scp.

scp foo.txt user@example.com:incoming/

On both servers this errored out, closing the connection immediately. Using SFTP worked fine on the working server, but scp didn't work on either server. Odd...

After some investigation, Will found out that scponly does NOT support scp by default.

From scponly's wiki:

The new release of scponly-4.2 has:
no support for scp by default...

Excellent! In fact, reading this inspired me to write a program called calculatoronly that does not support numeric calculations by default.

The Fix

Back to our original problem... if you're running FreeBSD 6.2 and setting up scponly chroot'ed users, the port doesn't create all files that the new FreeBSD scp binary requires. I'm sure they'll fix this soon, but in the mean time you can create these files manually:

// run the scponly chroot script as you normally would su cd /usr/local/share/examples/scponly/ && /bin/sh setup_chroot.sh // ... create the account as you normally would // manually make these files if you're on FreeBSD 6.2 // replace /home/USER with the path to the account you just made mkdir /home/USER/dev touch /home/USER/dev/null chmod 0666 /home/USER/dev/null

But, since scponly only supports sftp, don't use it to scp files. Obviously.

More Articles Get the RSS Feed Post A Comment

3 Comments

by Will Bond   #
on February 8, 2007 / 4:29pm
"and, yeah, I really do think"
by Fred LeBlanc   #
on February 8, 2007 / 4:51pm
This metaphor is a limo.
by Sunflower Seed   #
on February 8, 2007 / 5:42pm
Fr3d teh p4rty POOP3r

Comments have been turned off on this blog.
Read something more recent.

Statements and opinions expressed in this blog and any comments made are the private opinions of the respective poster, and, as such, iMarc LLC is neither responsible nor liable for such content.

iMarc

iMarc is a web development company in Newburyport, MA. This is our blog.
View all blogs or learn more about iMarc.

About the Author

Dave's Head Dave Tufts, Vice President of Technology
I help people build websites.
I have two daughters.
I'd rather be gardening.
More blogs by Dave

Search Our Blog

Recent Communiqués

  • Bureaucracy at the W3C
  • Clients
  • Bring Back Fun
  • Browsers and Brands
  • Getting shot in paintball is good for you
  • Hiring: Junior Web Developer, Specializing in PHP
  • Password Management Done Right
  • BOFH
  • Limits
  • Unfriendliest CAPTCHA ever
  • Debug CSS
  • Bringing Business White Papers to the Web
  • i ♥ @alaskaair
  • Micropayments
  • Beating CAPTCHA

Popular Communiqués

  • Bring Back Fun
  • Password Management Done Right
  • Hiring: Junior Web Developer, Specializing in PHP
  • Getting shot in paintball is good for you
  • Clients
  • Bureaucracy at the W3C
  • Browsers and Brands
  • BOFH
  • Limits

Recent Comments

  • Bring Back Fun

    By Robert Mohns: Go to panic.com/goods Drag a t-shirt into the "Cart" at the bottom of the screen. …

  • Inconsistent Web Analytics Numbers: Google vs. The World

    By Jim Samuel: Great article. Thanks for posting it. I've been trying to find an explanation for the discrepancy between…

  • Password Management Done Right

    By Mary: Hey Dan, great post. I've been using a VeriSign secured toolbar called Billeo to manage my…

  • Browsers and Brands

    By Reto L.: I think Rob has it right -- I just asked my mother how she gets to CNN's website and her response was…

  • Browsers and Brands

    By Robert Mohns: Actually, I think all those people who said the browser is how you search for stuff are correct. What's…

RSS

RSS Icon Learn about RSS and get the feed for our blog.

About iMarc

  • We build custom web sites
  • In-house strategy, design, programming, hosting
  • In business since 1997
  • We’re located in Newburyport, MA
  • Call us at (978) 462-8848

© 2009 iMarc LLC, Contact Us

Links

  • Home
  • Portfolio
  • Client Support
  • Log In
  • (icon)RSS

Meet the Team

Melissa's Head Melissa Maguire, Designer

I design for print and web, with a focus on branding and print collateral.

Learn More | Meet the Others