LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-10-2009, 06:38 AM   #1
qrshat
Member
 
Registered: Oct 2005
Posts: 56

Rep: Reputation: 15
restrict a FTP user from changing directory


Hi Friends,

it's on my solaris system.

i have got a user TEST for the purpose of FTP.

my problem is :
while FTP-ing, he should not move to other
directories other than his home directory.
i want him stay rigth there and put/get his
files.hope i am clear.

any solution !

I found related issue in forum, but all of them related with Linux.

thanks in advance,
 
Old 02-10-2009, 08:42 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You don't say what version of Solaris you're using and what ftp server.
Assuming that you use a fairly new Solaris (9 or 10) and the bundled ftpd server, then you need to edit /etc/ftpd/ftpaccess and add the following line
Code:
restricted-uid <username>
or just add the username you want to restrict, if the above line exists.

Regards

Last edited by bathory; 02-10-2009 at 09:02 AM.
 
Old 02-11-2009, 01:28 AM   #3
qrshat
Member
 
Registered: Oct 2005
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
You don't say what version of Solaris you're using and what ftp server.
Assuming that you use a fairly new Solaris (9 or 10) and the bundled ftpd server, then you need to edit /etc/ftpd/ftpaccess and add the following line
Code:
restricted-uid <username>
or just add the username you want to restrict, if the above line exists.

Regards
I don't want restrict him for FTP. I just want to restrict his ftp directory.
 
Old 02-11-2009, 01:42 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I don't want restrict him for FTP. I just want to restrict his ftp directory.
That's exactly what "restricted-uid ..." does. Restrict the user in his home directory.
 
Old 02-11-2009, 03:14 AM   #5
qrshat
Member
 
Registered: Oct 2005
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
That's exactly what "restricted-uid ..." does. Restrict the user in his home directory.
Thanks. it's work. But now i'm faced another restriction problem. I just would like to give ftp sesion rights to the user. So i changed his shell to /usr/bin/false. But when i changed his shell, he couldn't create a ftp session. How i give him just ftp session rights.

thanks in advance.
 
Old 02-11-2009, 04:02 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I just would like to give ftp sesion rights to the user. So i changed his shell to /usr/bin/false. But when i changed his shell, he couldn't create a ftp session. How i give him just ftp session rights.
This works much like in linux. Just follow this link.

Regards
 
  


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
how to restrict user for just one directory? J0sep Linux - Security 5 12-02-2008 04:49 PM
vsftpd: restrict ftp user to designated directory Niceman2005 Linux - Software 3 06-19-2008 01:58 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 to restrict user (FTP)? Rex_chaos Linux - Networking 2 03-19-2003 04:48 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

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