LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 01-16-2006, 10:46 AM   #1
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Rep: Reputation: 15
User permissions


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.
 
Old 01-16-2006, 08:28 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 01-17-2006, 02:09 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 01-19-2006, 10:53 AM   #4
JSLayton
Member
 
Registered: Apr 2005
Location: Warrior, AL
Distribution: Slackware 10.1, Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by timmeke
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.
 
Old 01-19-2006, 11:25 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
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?"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user permissions blubbfish Linux - Security 2 04-28-2004 06:33 AM
user permissions blubbfish Linux - Newbie 1 04-27-2004 01:22 PM
user permissions Hmmyah Linux - Newbie 4 12-11-2003 08:03 PM
user permissions Vyeperman *BSD 6 10-06-2003 02:10 AM
user permissions newpenguin Linux - General 7 11-07-2002 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration