Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-10-2009, 02:31 PM   #1
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 646

Rep: Reputation: 33
FTP access to /var/www/html/web_folder

I use NetBeans to make my php-website.
I have a remote Apache on my LAN.
NetBeans lets you work on your remote server through FTP.

So I need secure FTP-access to /var/www/html/web_folder on the remote machine.

Do I need to install a FTP-server just to be able to do this ??
Have no experience (yet) with accessing a html-folder to edit the php-files...
Old 07-11-2009, 07:27 AM   #2
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 646

Original Poster
Rep: Reputation: 33
So I have installed vsftpd... Documentation says how to deny users to ftp to the server, but not how to define an allowed user and his directory.

I have a normal user 'webserver' :
[root@webserver vsftpd]# cat /etc/passwd | grep web
This user has rights to the directory I want to access via ftp :
[root@webserver vsftpd]# ls -l /var/www/html/
total 12
drwxrwxrwx 2 webserver root 4096 2009-07-07 14:36 asterisk
drwxrwxr-x 6 root      root 4096 2009-07-06 21:36 asterisk-stat
-rw-r--r-- 1 root      root   54 2009-07-02 13:07 index.php
In my iptables I have the following rule :
-A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
But when I want to access my asterisk-webdirectory, I get the error of my IDE "FTP server refused connection".

It is completely unclear to me how to access this directory through ftp...
Old 07-11-2009, 08:23 AM   #3
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
With regards to the allowed users:

This should be in your vsftpd config. It will tell vsftp to use a userlist that DOES NOT contain denied users and teherfore contains allowed users.
#WimS: only allow selected users
And something like this is in the userlist_file defined above
# admin users need access for backups

# website users (basically developers) might want access to upload pages
I never use a setup with /var/www as I (simply said) don't understand it. My webpages are in the user's home directory which makes jailing them to their home directory a breeze as I don't have to think about access to /var/www. Someone else can advise you there.

FTP is insecure as your credentials go over the net without encryption. You can consider to use FTPS ( see ) but I don't know if it's supported by Netbeans.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configure /var/www/html for user write access? SlowCoder Linux - Server 9 07-26-2009 05:37 PM
FTP client can't access files in /var/www/html (Apache ) dshap Linux - Newbie 8 06-03-2009 12:12 PM
Symbolic Link For FTP Access To /var/www/html ERRRRRRRRRRRR! JustinK101 Linux - Software 3 01-31-2007 11:32 AM
How do I give access to an ftp user to the var/www/html dir shootinstr8 Linux - Newbie 1 10-13-2006 03:32 AM
how to setup ftp user's diretory as /var/www/html lzyking Linux - Software 4 02-25-2003 12:58 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration