LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-11-2011, 03:13 PM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question Restrict FTP commands


Hi All,

I have CentOS 5.5 boxes with vsftpd installed on them and users are authenticated through LDAP (Windows AD).

I need to restrict FTP commands like mget, mput, ls, e.t.c. for users.
The commands permissions may vary from user to user.

Is it somehow possible in VSFTPD or some other FTP package like pureftp or proftp.
 
Old 04-12-2011, 01:16 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I'd bookmark this page http://vsftpd.beasts.org/vsftpd_conf.html and read the cmds_allowed, cmds_denied sections.
 
Old 04-12-2011, 01:50 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Thumbs up

Quote:
Originally Posted by chrism01 View Post
I'd bookmark this page http://vsftpd.beasts.org/vsftpd_conf.html and read the cmds_allowed, cmds_denied sections.
Very useful Chris. Many thanks.
I am going to try this and post my results here if in case I stuck somewhere, But does it have an option to say create a group of users and then restrict commands to them only and everybody else has access to all commands.
 
Old 04-15-2011, 10:53 AM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Chris this really worked well for me, But I am looking for some options in which I can set manage access to FTP commands to specific users.

For E.g.
user john1 can access mget command
and at the same time
user john2 cannot access mget command

What "cmds_allowed" option does is that it allows/disables commands for all (not specific) users.

However, I believe "cmds_denied" option is not valid anymore.
Code:
[root@box1 ~]# service vsftpd restart
Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd: 500 OOPS: unrecognised variable in config file: cmds_denied
                                                           [FAILED]
 
Old 04-18-2011, 06:43 AM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Dear Chris/All,

Any ideas ?
 
Old 04-18-2011, 09:00 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You'll have to read that entire page I'm afraid;. I don't use vsftpd, but I do know it has a LOT of options.
You may find a way in there to do that.
As re cmds_denied, that's new as of
Quote:
. (Added in v2.1.0).
in that link.

Good luck.
 
Old 04-19-2011, 08:08 AM   #7
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by chrism01 View Post
You'll have to read that entire page I'm afraid;. I don't use vsftpd, but I do know it has a LOT of options.
You may find a way in there to do that.
As re cmds_denied, that's new as of
in that link.

Good luck.
I have read the whole page, could not find anything.

Do you have any idea about any other FTP package which could serve my purpose (like proFTP, pureFTP e.t.c.) ?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can sudo restrict certain commands? Thaidog Linux - Security 3 01-30-2009 11:24 AM
Restrict what commands users can use? jasone *BSD 1 11-30-2006 06:50 AM
how to restrict ftp user manish_meet_in Linux - Newbie 9 05-31-2006 11:52 PM
Restrict User to FTP Only maxhugen Linux - Security 3 10-23-2003 06:01 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:06 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