Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Rights to ftp users

Posted on 1999-07-21
14
Medium Priority
?
236 Views
Last Modified: 2010-04-20
I need one user accesing via FTP, but i just want him to access one directory and not any other.
0
Comment
Question by:crojas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
14 Comments
 
LVL 4

Expert Comment

by:gunny051499
ID: 1635625
you will have to make that user part of a special group as a frist step.

then declare this group a guestgroup in ftpaccess:

guestgroup user_with_ftp_login

edit the file /etc/passwd and make the user's entry look something like:

user_with_ftp_login:x:1000:100:fullname:/homedir/./:/bin/date

where you have to pay attention to the "/./" after "/homedir" (could be /home/someuser/./). the point-slash at the end indicates that the users homedirectory should be chroot'ed at login. the /bin/date prevents from logging in via telnet
0
 
LVL 1

Author Comment

by:crojas
ID: 1635626
But when i tyr to login i can't because when i change the /bin/bash for
any other thing such /bin/date or /bin/false i can't access via ftp.
0
 
LVL 1

Author Comment

by:crojas
ID: 1635627
But when i tyr to login i can't because when i change the /bin/bash for
any other thing such /bin/date or /bin/false i can't access via ftp.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 4

Expert Comment

by:gunny051499
ID: 1635628
seems, my previous post got lost.....

ftp doesn't use either /bin/date nor /bin/bash. these are the shell's for a login. ftp doesn't use shell for login.
0
 
LVL 1

Author Comment

by:crojas
ID: 1635629
But when i use /bin/date or /bin/false i can't access via FTP, if i change this to /bin/bash i can connect via FTP, but also using Telnet, and i don't want via Telnet.
0
 
LVL 4

Expert Comment

by:gunny051499
ID: 1635630
change the ftp server. this it not the usual way ftp should handle this. most people now are using wu-ftpd; get verion 2.5.0 since it got rid of some bugs....
0
 
LVL 1

Author Comment

by:crojas
ID: 1635631
In many places i've found example using /bin/ftponly, the reference to this shell must be in the /etc/shells, but i don't have that and also i don't have the ftponly shell anywhere
0
 
LVL 4

Expert Comment

by:gunny051499
ID: 1635632
well /bin/ftponly could be an executable that just prints a message like "you are not allowed to login" and then exits. i don't think either that this one has to be in /etc/shells, since i'm working very comfortably without that on a freebsd machine. however you can try to insert it there.

PS: don't use scripts for "ftponly" and no executable, that is interuptable.
0
 
LVL 1

Author Comment

by:crojas
ID: 1635633
I have Redhat 6.0 and i just upgraded to wu 2.5 and the problem still exist.
If i change the /bin/bash to /bin/false i cannot connecto to ftp
0
 
LVL 4

Expert Comment

by:gunny051499
ID: 1635634
you are right, sorry. i just tried it now on my linux machine. i couldn't use ftp after changing shell to /bin/date. after adding /bin/date to /etc/shells it worked.
0
 
LVL 1

Author Comment

by:crojas
ID: 1635635
You're right, post your answer and points are for you
0
 
LVL 4

Expert Comment

by:gunny051499
ID: 1635636
*grin* it seems you should be able to give points to yourself this time *grin*
0
 
LVL 1

Author Comment

by:crojas
ID: 1635637
I didn't know how to setup a guestgroup in ftpaccess and also i didn't know why it doesn't work the /bin/false in passwd, so you have the right.
0
 
LVL 4

Accepted Solution

by:
gunny051499 earned 1200 total points
ID: 1635638
ok.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question