?
Solved

Create an Account that has access to ftp only to one particular folder?

Posted on 2003-02-20
3
Medium Priority
?
361 Views
Last Modified: 2013-12-27
I've solaris and apache server installed.
The rootDirectory of apache server is /var/apache/htdocs
Only Root account has access to that folder. Now i'd like to create a new account that can only ftp to this folder only.
How do i do it?
0
Comment
Question by:Angaar
[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
3 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 7991813
Let's say, you want to give fred read and write permission
for /var/apache/htdocs

you can simply do:

cd /var/appache
chown  fred htdocs

0
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 600 total points
ID: 7993265
Instead of chown'ing htdocs to fred, you're better off creating a 'htdocs' group and doing something like
  chgrp htdocs /var/apache/htdocs
  chmod g+rwx /var/apache/htdocs

Though you might not even want fred to be able to write directly in htdocs but rather in some set of subdirectories.
Also, you might not want to use FTP, since it sends passwords as clear-text over the network. Instead consider SSH/SCP/SFTP (see www.openssh.com for free implementations)
0
 

Expert Comment

by:bluedragon_2
ID: 8540945
You can create an ftp only account:

create a file /bin/ftpaccess

echo 'echo "This account is for ftp access only"' > /bin/ftpaccess

chmod a+x /bin/ftpaccess to give it execution rights

Add /bin/ftpaccess into the /etc/shells file
*It is important to have the other shells there as well

create an account that you want to have the ftp access only and for its shell, put /bin/ftpaccess

You will have to set the rights to the directory that you want the account go to.

If you try to telnet to that account, you will get the message "This account is for ftp access only".
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 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