LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-14-2007, 11:55 AM   #1
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Rep: Reputation: 15
vsftp permissons error on /www/html/.. FC6


My old RH9 server had a hard drive failure, so I got a new box and installed FC6. Well needless to say I can't figure out what is going on with the FTP service. I have setup one user to ftp HTML files to the website and no matter what I do I can't get my user to beable to read the /var/www/html/mixon folder.

I think the vsftp is good cause I can write and read all day long to the home/mixon folder. But I can't get it to do anything outside this folder. I have given permissions that looks the same on the other folder as the home folder, but can't get anywhere.

Currently I have a sym link in the home/mixon folder going to the /var/www/html/mixon folder, however when you click that link it says Transfer done (but failed to open directory). It did the same thing when I set the home folder to the /var/www/html/mixon folder.

I honestly think there is some permission problem with the folder outside the home folder, but for the life of me I can't figure it out. Any input would be appricated.

Thanks...


/var/www/html....
drwxr-xr-x 2 root root 4096 Jan 10 16:02 misc
drwxrwxrwx 2 mixon mixon 4096 Jan 11 16:06 mixon
drwxr-xr-x 4 root root 4096 Jan 10 16:05 programs

VSFTPD.conf file...
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ftpd_banner=Welcome to TECH FTP service.
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
virtual_use_local_privs=YES
 
Old 01-16-2007, 06:00 AM   #2
CaptainInsane
Member
 
Registered: Nov 2003
Location: Peoria
Distribution: Fedora 8
Posts: 92

Rep: Reputation: 15
The easy fix, would be to create a new user, just for the FTP transfers
to that folder. Make their home folder the /var/www/html/mixon
location.
You may need to add an entry for them in /etc/vsftpd_user_configs

Note for that too work you may have to disable the annon ftp, and start
using login/passwords for the ftp access, but not 100% sure on that....
 
Old 01-16-2007, 08:35 AM   #3
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
I set the home folder for mixon to be /var/www/html/mixon, and it does the same thing. It still always says " 226 Transfer done (but failed to open directory)" I also disabled anonymous access restarted the service and it didn't change anything. There was no /etc/vsftpd_user_configs, but there was /etc/vsftpd/user_list, but adding the user to this list still doesn't give mixon access to the /var/www/html/mixon listing. I can't figure out what system rights are different about /home/mixon, vs. /var/www/html/mixon that wouldn't allow a directory listing.

Fedora Core 6
vsftpd 2.0.5
Apache 2.2.3
 
Old 01-17-2007, 09:58 PM   #4
CaptainInsane
Member
 
Registered: Nov 2003
Location: Peoria
Distribution: Fedora 8
Posts: 92

Rep: Reputation: 15
Hi again.

/etc/vsftpd_user_configs should be a directory. You put a file for
each user in there with the permissions they should have.
Make that directory, then create a file named mixon with the
following content:

anon_world_readable_only=NO
write_enable=YES
anon_upload_enable=YES

You may also need to open up a range of tcp ports in your firewall for the
passive ftp transfers to work. (I use 50000:52999)

Also make sure your vsftpd.conf file has the following lines:


pam_service_name=vsftpd
userlist_enable=YES
chroot_local_user=YES
user_config_dir=/etc/vsftpd_user_configs
#enable for standalone mode
listen=YES
tcp_wrappers=YES
pasv_min_port=50000
pasv_max_port=52999

Good luck. If anybody else sees problems with this, or knows of a
better way, feel free to post here !
 
Old 01-20-2007, 11:42 AM   #5
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for the help captaininsane, I added the config and just to make sure turned the firewall totally off after adding the 50000-52999 ports didn't work.

Well I am still in the same boat, I can login and I know it is reading the new config file we made, cause if I change the ownership it will not login with ftp due to the config file not belonging to root it says.

Error is still that the transfer is done, but failed to open the directory. The Ftp does dump me in the root of the server (/), if I manually change that to /home/mixon, or /var/www/html/mixon it will say 550 failed to change directory. So I am not sure what happend, but before the changes I could read and write to /home/mixon just fine now it won't. Of course before it didn't dump me in / , it started in /home/mixon. Any other ideas? Maybe a CHROOT path? Sorry about all the troubles. Thanks again for the help...
 
Old 01-20-2007, 03:36 PM   #6
CaptainInsane
Member
 
Registered: Nov 2003
Location: Peoria
Distribution: Fedora 8
Posts: 92

Rep: Reputation: 15
It does sound like the user is not chroot'ed properly. You might do some searches on that.
Here is a thread where somebody is having a similar problem:
http://www.linuxquestions.org/questi...d.php?t=520796

He hasnt got an answer or fix yet, but you may want to keep an eye on it incase one is
posted.
 
Old 01-20-2007, 10:52 PM   #7
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
Thank you. I will keep my eyes open. If I do figure it out I will post what fixed it.
 
  


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
FC6 ping on terminal works with www.google.com, not with http://www.google.com pxumsgdxpcvjm Linux - Networking 4 12-27-2006 03:36 PM
index.html is not noticed in /var/www/html xviddivxoggmp3 Red Hat 1 04-23-2006 06:30 PM
help in /var/www/html/!! chidomen Linux - Newbie 4 01-13-2005 11:02 AM
ownership of /var/www/html haobaba1 Linux - Security 1 08-04-2003 02:58 PM
chmod of /var/www/html alTereD Linux - Security 1 12-16-2002 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:40 PM.

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