Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I needed to allow a person access to my server via ftp to edit and change some webpages.
I created a user called rob and I made his home directory /var/www/html. The html directory is owned by root and all the web directories in the html directory are owned by apache. How can I get it so that user rob can log in via ftp and access everything in the /var/www/html?
Any help on this would be greatly appreciated.
This is the error I get when trying to log in. I'm guessing its an issue with perms or directory ownership.
Second, is there a reason you want him to have access to /var/www/html instead of his ~/public_html? Apache has a config file that will allow you to give each person their own directory for html. In the web browser, they would just type www.mysite.com/~rob/.
For that matter, I suppose you could just create a symbolic link from /var/www/html/index.html to /home/rob/public_html/index.html... Then he could change his files whenever he wanted to and the symbolic link would allow www.mysite.com to actually point to rob's directory. (Note I haven't tried this before, but don't see why it wouldn't work...)
Distribution: At home: Arch, OpenBSD, Solaris. At work: CentOS, Debian, Ubuntu
Posts: 3,625
Rep:
FTP expects to use certain ports in ways other protocols do not. It looks like you're using passive mode FTP. Passive mode FTP uses a random port for data and (in your case) port 16000 for commands (normal is 21). In this case it looks like it picked port 28287 to receive the data stream connection from the client. If that port is blocked by a firewall, this won't work.
In order to allow passive mode traffic through the server's firewall, use the pasv_max_port and pasv_min_port options in vsftpd.conf. Then modify iptables to allow traffic on the port range you defined.
I'm still having an issue with this I did set the pasv_max_port=195 and pasv_min_port=200 and I opened these ports on my firewall. However, the client still tries to connect on a random port. I did restart the service as well.
I run vsftpd from within xinetd. Here's the relevant xinetd conf file.
Code:
[root@petrel xinetd.d]# cat /etc/xinetd.d/vsftpd
# default: on
# description:
# The vsftpd FTP server serves FTP connections. It uses
# normal, unencrypted usernames and passwords for authentication.
# vsftpd is designed to be secure.
service ftp
{
flags = IPv6
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
# server_args += local_enable=YES
# server_args +=
# log_on_success += DURATION USERID
# log_on_failure += USERID
nice = 10
disable = no
}
On the client side, I use unkerberized ftp (not the one in /usr/kerberos/bin). When you type "which ftp", what is returned?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.