shiningpolaris.com

March 27, 2009

How to give a chroot’d FTPd access to outside folders.

Filed under: Linux — sherl0k @ 2:41 am

For basic security reasons, FTP daemons don’t let you access folders that are symlinks (aka shortcuts) to folders that are outside of your jailed root, when you have chroot jailing enabled. This is standard practice for most shared FTP servers. So for instance my FTP session is limited to /home/sherl0k and all its subdirectories. I recently added a second harddrive to my server, and I wanted to access that drive with two major conditions: 1) not mounting the drive in a folder that resides in my /home, and b) giving me access to the contents without requiring a second FTP login. I also wasn’t going to turn off chroot.

So as I said, a symlink is not possible here. Doing a ln -s /second/dreamcast ./dreamcast from inside my home, and then accessing it via FTP, would yield an error: 550 Failed to open file.

So what’s a sysadmin to do?

Oh, the joys of the mount command. Believe it or not, it’s possible to mount a folder and/or filesystem in two places at once. Mind you making changes in one place will yield those same exact changes in the other, so doing editing in both places at once would yield some issues. But for my uses, this would never happen. I suppose this would also apply to normal symlinks.

Lo and behold, the code to rule them all: mount --bind -rw /second/dreamcast/ ./dreamcast

The drive was originally mounted as /second, with the dreamcast directory owned by my user account. I can now "bind" the folder anywhere on the filesystem – in this case inside my home directory – and have full access to it via FTP. No symlink involved.

March 11, 2009

Finally, reliable technology in my hands.

Filed under: Uncategorized — sherl0k @ 3:13 am

I have been plagued all my life it seems with piece of junk routers that never work right. Started off with a Belkin that gave extremely bad speeds, moved to a D-Link that would die everytime someone’s wireless dropped, then to another D-Link that had its wireless drop every 24 hours, then to a Netgear that would just crap out every hour or so if used actively.

Granted, I get what I pay for with these routers, either they were provided by the ISP or were bought for less than $50. I’ve always wanted a Linksys, but those cost upwards of $60 in stores. I just couldn’t justify the coin.

I finally got fed up with my string of crappy routers, and bit the bullet. At least I thought I was going to. Apparently Linksys WRT54G-TM routers are only $40 on eBay. Snatched that deal up, and I’m happy as ever. Even flashed the beast with DD-WRT and I’m even happier. It was a breeze to install and it gives me so many more options to play with.

It’s kinda silly how giddy I can get over a piece of hardware; but after years of dealing with faulty consumer routers I’m just happy to have something that works.

March 6, 2009

Good stuff right here.

Filed under: Life,Linux,Work — sherl0k @ 7:29 pm

Working with a client to deploy thousands of Ubuntu images across a network, using (what else) free, open-source software.

I’m pretty stoked about this project, not only because it’s giving me a chance to prove myself to a bunch of experienced engineers who’ve been in the field for 15+ years, but also because I get to work with my favorite software of choice.

This job gets better every day.

March 1, 2009

I HAVE A DREAM…CAST.

Filed under: Life — sherl0k @ 1:35 am

i have a dream...cast

$45 for the DC, two controllers, and a memory card.

Not pictured: 377 Dreamcast games sitting on my external harddrive, ready to burn and play.

Powered by WordPress