when FTP user will go to specific directory


 
Thread Tools Search this Thread
Operating Systems Solaris when FTP user will go to specific directory
# 1  
Old 12-22-2008
when FTP user will go to specific directory

Hi experts,

I have a user "bingo" in my sunsolaris 9.
# /etc/passwd
bingo:x:513:1::/export/home/bingo:/bin/bash

when anyone Telnet to this user it goes to his home directory /export/home/bingo

But now i want- when someone FTP to this user "bingo" it will NOT go to his home dir. Rather it will go another specif directory. suppose: "/home/ftpbingo/"

Where to implement this one? Should i write anything in /export/home/bingo/.profile

thanks.

//purple
# 2  
Old 12-22-2008
In that case you should not assign any shell to the ftp users, modify the “bingo” to point to shell as /bin/false, alos same need to be entered into the /etc/shell . If the file do not existing then create one and add all the required shell into this file.
# 3  
Old 12-22-2008
Hi Kumar,

can u pls clarify more.

If someone telnet bingo- he will go to bingo's home dir. i.e /export/home/bingo/

if sameguy ftp bingo- he will go to /home/ftpbingo

To do this which file i need to modify or what things need to be define?
# 4  
Old 12-22-2008
1st change the shell of user to /bin/false you can do the same with below command

Quote:
usermod –s /bin/false bingo
Then check if the /etc/shells file in etc folder if its exists then add a line as /bin/false and save the changes.

Try again with telnet, ideally it should not allow you to login as user bingo do not have any login shell assign
# 5  
Old 12-22-2008
Hi Kumar,

Here is the requirement-
If someone Telnet bingo- he will go to bingo's home dir. i.e /export/home/bingo/

Note that i have made some script which started with "#!/usr/bin/bash"; So, I cannot change the shell of "bingo"

Now if someone FTP bingo then he will go to /home/ftpbingo

!!So, Telnet will work normally. Only exception is FTP.
# 6  
Old 12-22-2008
As per my understanding the best option seems to be duplicating the UID with two different names one as bingo and other could be ftpbingo where in case one you assign the logging shell however in second case you can assign no shell.

I am sure other experts can through some light on the solution

Last edited by kumarmani; 12-22-2008 at 10:39 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Limit bash/sh user's access to a specific directory

Hello Team, I have Solaris 10 u6 I have a user test1 using bash that belong to the group staff. I would like to restrict this user to navigate only in his home directory and his subfolders but not not move out to other directories. How can I do it ? Thanks in advance (1 Reply)
Discussion started by: csierra
1 Replies

2. Solaris

Limit FTP user's access to a specific directory

Hi, I have searched "Limit FTP user's access to a specific directory" subject for 3 days. I found proftp and vsftp but i couldn't compile and install. Is there any idea. Please suggest. (6 Replies)
Discussion started by: hamurd
6 Replies

3. UNIX for Advanced & Expert Users

allow user to use sudo cp on a specific directory and only a specific file

Is there a way to allow a user to use sudo cp on a specific directory and only a specific file? (6 Replies)
Discussion started by: cokedude
6 Replies

4. Solaris

How to restrict user to a specific directory in solaris 10

Hi all, I want to create a new user and grant him ONLY transfer files access to a specific directory where he can only upload and read the files. He should be restricted to this activity only. Regards (6 Replies)
Discussion started by: gilldn
6 Replies

5. Solaris

Restrict FTP User to a Directory

I am using Solaris 10 on SPARC. SunOS ddw 5.10 Generic_139555-08 sun4u sparc SUNW,SPARC-Enterprise I have put some text files in a directory '/u01/network' I want to create a ftp user which can just read the files in the network directory. The ftp user shouldn't be able to navigate or see... (4 Replies)
Discussion started by: fahdmirza
4 Replies

6. Solaris

User permission to a specific directory only

is is possible to grant user access to only one subdirectory? example a. create ftp user with read/write/delete access (ftp user doesnt belong to uguys group) $ cd /etc/mydir $ls file1 file2 $ls -al -rw-rw-r-x 2 unixguy uguys 96 Dec 8 12:53 file1 -rw-rw-r-x 2 unixguy uguys 96 Dec 8... (1 Reply)
Discussion started by: lhareigh890
1 Replies

7. UNIX for Dummies Questions & Answers

granting permission to file/directory to a specific user

hello, I would like to grant full access to a directory which is owned by root and the web application that created it. I have though of adding the permission to the whole world, but for security reason I would like to grant it to one more user. I have tried this 'chmod -U newUser+wrx... (2 Replies)
Discussion started by: run123
2 Replies

8. Solaris

lock user to directory in ftp

how can i lock a specific user to his home directory when he logs on to the computer with ftp? thanx! (3 Replies)
Discussion started by: eliraza6
3 Replies

9. Solaris

give user permission on specific directory in solaris

dear all does any one give any user write permission using access control list or another way to solve this problem (1 Reply)
Discussion started by: murad.jaber
1 Replies

10. UNIX for Dummies Questions & Answers

Specifying FTP user Home Directory

Hi, I am running Solaris 10 and I am using the ftp server that comes with it. I would like to specify a specific directory as ftp user's home directory. For example, if "ftpuserx" ftps into my solaris machine, they will automatically be taken to "/space/web" directory, even though there... (0 Replies)
Discussion started by: annointed3
0 Replies
Login or Register to Ask a Question