Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to create a user that will only be used to FTP files to the server. I need this user to only have upload access to one directory. I don't want this user to be able to download files, change files, delete files, look at other directories, nothing except upload files to the one directory. What is the simplest way to do this? Thanks in advance.
The easiest way actually would be for you to just setup some type of webpage that allows uploads, using php or the like. But you can always create your user, make sure they have no shell access by adding /bin/false to your /etc/shells file and make sure that /bin/false is their designated shell, then whatever directory you want them to have write access to, make it their home directory with only -w--w---- access and also making sure to use chroot to jail them to this directory.
As an alternative to the webpage approach, you can also try setting up an FTP server, with virtual users (no real logins), chroot'ed to the directory in which they can upload (= their home directory).
With most common ftp servers, you can have many access restrictions (such as no downloads, chown/chmod on uploaded files, etc).
Personnally, I don't think a directory with -w--w---- permissions does the trick. A directory needs to be searchable (x permission) and readable to know it's contents. So, uploads may fail, but I'm not sure.
As an alternative to the webpage approach, you can also try setting up an FTP server, with virtual users (no real logins), chroot'ed to the directory in which they can upload (= their home directory).
With most common ftp servers, you can have many access restrictions (such as no downloads, chown/chmod on uploaded files, etc).
Personnally, I don't think a directory with -w--w---- permissions does the trick. A directory needs to be searchable (x permission) and readable to know it's contents. So, uploads may fail, but I'm not sure.
This is exactly what I ended up doing. Thank you very much for all of your suggestions. I have it working exactly how I need it to now.
JSLayton, it would be very helpful now if you would write one more posting .. to summarize the problem once more and to describe in some detail exactly what you did decide to do and why.
Here's who you're writing for... a person who, two years from now, has done a Search on this forum, has found this complete thread, and has read all the way to the end where the thread ends ... "yep, I found the answer! Thanks!" ...
... and our beleaguered searcher from the future replies, to quote Linus (van Pelt, Peanuts..."A-A-U-U-G-G-H-H-!"
So, can we bring closure to the thread .. summarize it .. "wrap it up?"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.