Restrict FTP access to a single directory for only one user.

Hi All,

 It will be very great if you can help me in this issue. Thanks in advance.

 I need to enable FTP on a solaris9 server. I need to create a new user some "xxxxxx" and he can only FTP the files to and from between /tftpboot directory and network devices. Other users should not FTP the files from /tftpboot directory.

Please give me your valuable information in solving this issue ASAP.

Thanks,
santhosh

Look out for the account option of ftp..

This is what the man pages say..

account [passwd]
	      Supply a supplemental password required by a remote  system  for
	      access  to  resources  once  a  login has been successfully com-
	      pleted.  If no argument is included, the user will  be  prompted
	      for an account password in a non-echoing input mode.

Hope this is what you are looking for..

If you don;t want to to it this way, maybe create a new group on the target machine and add the user (only) to that group.
Give proper permissions to the directory from where you want to copy files for that group only.

Thanks!
nua7

deny ftp access to users by placing their id into the /etc/ftpd/ftpusers file. Btw, you can check the FTP services enabled in the /etc/inet/services file

just u denied ftp access to users by placing their id into the /etc/ftpd/ftpusers file.
once u check netstat -ae
it will display wether service is on or off.
it is on ok otherwise restart the services.
in sol10 #svcadm enable ftp or sol9 u have to go /etc/init.d
servies are in /etc/services.

Hi All,

Thanks for your support. But still my issue was not resolved. I will explain you what i need to do exactly.

Basically i have a solaris9 server. In which i have a directory called "/tftpboot/" in which i am storing configuration files of the network devices of some domain\(switches/routers\).

I will get the configuration backup of those network devices using FTP from my server. while doing FTP i need to restrict the FTP session for a single user and also that specific user can only FTP the configuration files to the directory "/tftpboot/". so others should not initiate a FTP session from my server to the network devices in my domain(only that specific user can initiate FTP session). One more thing is "/tftpboot/" directory will be used by other users who are storing configuration files of other domain network devices.
so now how can i restrict the specific user to do FTP from /tftpboot/ to the devices.
Please help me in this. :slight_smile:

thanks,
santhosh

sorry to confuse you all.....

other users also should not initiate FTP session from /tftpboot directory..means other users should not put the files into /tftpboot directory using FTP... let them take the opportunity of transferring the files using scp or sftp or tftp but not through FTP..

If I copied you right...
How about giving special permissions to the directory.. Even if the users try to ftp, they won;t be able to copy files..

That should solve the problem right...

hmmmm...looks like worth..

But what special permissions can we give while transferring files using FTP?

Give read and write permissions only to the owner of the file, so that only owner can ftp those files..