LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-09-2006, 02:53 AM   #1
sunhui
Member
 
Registered: Jan 2006
Location: taiwan
Posts: 156

Rep: Reputation: 30
Control ftp directory


I want to create a new login ID and control this ID can ONLY access to a specify directory eg. /home/ftp_usr
But I found that the user can go other directory by "cd /tmp" or " .. " to go to top level , can advise how to disable the user run "cd" command ? thx.
 
Old 10-09-2006, 03:50 AM   #2
sunhui
Member
 
Registered: Jan 2006
Location: taiwan
Posts: 156

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by sunhui
I want to create a new login ID and control this ID can ONLY access to a specify directory eg. /home/ftp_usr
But I found that the user can go other directory by "cd /tmp" or " .. " to go to top level , can advise how to disable the user run "cd" command ? thx.


I use vsftp , I have setup #chroot_list_enable=YES , now ALL users can only access his $HOME directory , can advise if I just want a SPECIFIC user apply this feature , what can I do ? thx.
 
Old 10-09-2006, 04:04 AM   #3
lupalb
LQ Newbie
 
Registered: May 2006
Distribution: Slackware
Posts: 10

Rep: Reputation: 1
hi
i think you can try "sudo"



" Granting All Access to Specific Users

You can grant users bob and bunny full access to all privileged commands, with this sudoers entry.

bob, bunny ALL=(ALL) ALL

This is generally not a good idea because this allows bob and bunny to use the su command to grant themselves permanent root privileges thereby bypassing the command logging features of sudo. The example on using aliases in the sudoers file shows how to eliminate this prob
Granting Access To Specific Users To Specific Files

This entry allows user peter and all the members of the group operator to gain access to all the program files in the /sbin and /usr/sbin directories, plus the privilege of running the command /usr/local/apps/check.pl. Notice how the trailing slash (/) is required to specify a directory location:

peter, %operator ALL= /sbin/, /usr/sbin, /usr/local/apps/check.pl

Notice also that the lack of any username entries within parentheses () after the = sign prevents the users from running the commands automatically masquerading as another user. This is explained further in the next example.
Granting Access to Specific Files as Another User

The sudo -u entry allows allows you to execute a command as if you were another user, but first you have to be granted this privilege in the sudoers file.

This feature can be convenient for programmers who sometimes need to kill processes related to projects they are working on. For example, programmer peter is on the team developing a financial package that runs a program called monthend as user accounts. From time to time the application fails, requiring "peter" to stop it with the /bin/kill, /usr/bin/kill or /usr/bin/pkill commands but only as user "accounts". The sudoers entry would look like this:

peter ALL=(accounts) /bin/kill, /usr/bin/kill /usr/bin/pkill

User peter is allowed to stop the monthend process with this command:

[peter@bigboy peter]# sudo -u accounts pkill monthend
"

Last edited by lupalb; 10-09-2006 at 04:37 AM.
 
  


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
Control ftp directory sunhui Linux - Security 1 10-06-2006 04:33 AM
control the ftp directory sunhui Linux - Software 1 09-14-2006 09:20 PM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 10:55 PM
FTP control through script this213 Linux - General 2 05-20-2004 12:31 PM
Directory listing control with .htaccess quincy56 Linux - Security 0 02-09-2002 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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