I've got a simple Ubuntu (14.04) server. I now want to give ftp or ssh access to a specific folder to a friend of mine. Either ftp or ssh would be fine, I'm just after a quick setup. The problem is now that finding a quick and dirty solution doesn't seem to be as easy as I hoped for.

I first checked out ssh for which I found this blog, which seems a bit too complicated for my basic linux knowledge. I can't find an easier/simpler solution for ssh though.

I then looked around for ftp solutions, for which vsftpd seems to be the way to go. Looking through the vsftpd config page I am totally lost though.

Does anybody have a quick and dirty way to give someone read and write access to a specific folder on a Linux server? No need for extremely tight security or best practices (many files are somewhat public anyway). Anything that works would be awesome!

  • Do you need authenticated access, or will anonymous access work? – Keith Aug 13 '14 at 22:49

On a normal Linux (especially Ubuntu) install, ssh is installed by default.

So, the quickest way to share a file/folder would be:

  • Make a new user account for your friend
  • Open root terminal
  • cd /home/{friends-account-name}
  • ln -s {full-path-of-folder-you-want-to-share} {convenient-name-for-your-friend}
  • Make sure permissions of and in the folder (the original folder, not the link you just made with ln) you want to share allow your friend's account to access, i.e. the "world" or chmod __X part of the permissions. Use ls -al to check permissions.

Your friend can now use ssh to login (or "Connect to Server" from Nautilus or similar) (or WinSCP from Windows) and will find a link to the folder you want to share when he logs in.

If you have anything in your home folder you need to have private, make sure the files/directories have chmod __0 (e.g. chmod 770, etc.) permissions.

There are more advanced things you can do, such as chroot your friend to the home directory so he can't navigate out of it and such, but for quick and dirty use, the above will do. Normal non-root user accounts can't do anything with system files so don't worry about that.

  • Thats awesome! I've setup new ssh users before but didn't think of the softlink trick. You've made my day ultrasawblade! – kramer65 Aug 14 '14 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.