LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-29-2003, 03:05 PM   #1
Supp0rtLinux
Member
 
Registered: Dec 2001
Location: Carlsbad
Distribution: LFS 4.0 (www.linuxfromscratch.org)
Posts: 44

Rep: Reputation: 15
Question FTP permission Question


I have a need to allow a specific user to access my ftp server and ONLY upload files to a pre-determined directory. I am running RH7.3 and am familiar with the various /etc/ftp.* files. I am not running anon-ftp and don't want to. What I can't figure out how to do is to allow the user to login, upload file(s), and exit only. I don't want the user to be able to do anything else... no 'ls', no 'cd', etc. I've found the basics for restricting creation of and deleting directories, files, etc... but not for restricting other commands. How do I restrict 'ls' and 'cd'... or better, how do I allow ONLY login, upload of file(s), and exit?
 
Old 04-29-2003, 03:14 PM   #2
Supp0rtLinux
Member
 
Registered: Dec 2001
Location: Carlsbad
Distribution: LFS 4.0 (www.linuxfromscratch.org)
Posts: 44

Original Poster
Rep: Reputation: 15
meant to include that I am using proftpd
 
Old 04-29-2003, 07:03 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
chmod -r /path/to/upload/directory

Ok, here's how I'd do it...

First, make a DefaultRoot in your profptd.conf file. This will restrict the user to that as their / (root) directory. From there I'd change permissions to only allow execute and write, remove read:
chmod -R 333 /home/ftp (assuming your DefaultRoot is set to /home/ftp)
With that, I believe the user would only have execute (meaning be able to enter the directory) and write (meaning upload files) but not read (cannot ls).

Now, assuming they are doing this via some sort of command line ftp program, you'll also want to either give them a restricted shell or look into other options incase they try to ssh (I use rbash).

HTH

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
permission peroblem using Ftp owais Linux - Networking 1 10-21-2004 05:15 AM
ftp up/download permission prob Stex Linux - Networking 6 10-03-2003 01:23 PM
ftp into redhat (permission denied) mrobb Linux - Software 5 05-20-2003 03:13 PM
Ftp permission problem 360 Linux - Networking 4 02-19-2002 10:49 AM
FTP Permission Denied Rfriend@ucwv.edu Linux - Networking 2 08-23-2001 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:43 AM.

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