LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 08-17-2004, 08:12 AM   #1
stasjohn
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Rep: Reputation: 0
setting up ftp for default web folder




question about ftp.


Setting up a webserver (mostly for testing web pages)
Fedora Core 2, Apache, Php 4.3.4

The server is set up to allow user directories...
/home/user1
/home/user2

I have no problems connecting to these folders using ftp.


My dilemma is this...
I want to access the default web folder ( /var/www/html ) using ftp.

I'm not sure how to set up the permissions for it? I'd like to set up a new username/password who has access to the folder.


I did try creating a user (user3), then I set the permission of the "html" folder to
file owner: user3
file group: apache

but when I try to connect via ftp, I get "OOPS: cannot change directory"



Thanks in advance!
 
Old 08-17-2004, 09:10 AM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Hey! Welcome to LQ!

>> I want to access the default web folder ( /var/www/html ) using ftp.

But why? You shouldn't need to. Your users have all their stuff under /home/user1 and /home/user2 so they shouldn't need access to that via FTP. You can set their document roots to their home directories and you can have them FTPing into their home directories, so I don't see why you'd want to give them access to /var/www.

Not meaning to be blunt... just trying to understand why.
 
Old 08-17-2004, 08:52 PM   #3
stasjohn
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I think my question was misunderstood.


Yes, my users do have their document roots set to their home directories. That works fine. I'm not looking to give the users access to /var/www/html.



I want to give myself ftp access to /var/www/html so I can put up a default website.

Thanks again!
 
Old 08-17-2004, 09:02 PM   #4
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Ah! Ok. In that case, you need to be sure that all the folders above it are the right permissions. The /var directory needs to be 755 and owned by root. The www folder needs to be owned by "user3" or whoever you picked for a username when you made that dummy account. You should also chmod this to 755 too. The other folders under there also need to be owned by user3, otherwise the FTP server can't chroot you to that directory.

What FTP system is this we're talking about?
 
Old 08-17-2004, 10:02 PM   #5
stasjohn
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Hmm...

I set
/var > owner:root / group:root > chmod: 755
/www, and below > owner:user3 / group:apache > chmod: 755

I still can't connect. I'm getting a "OOPS: cannot change directory" message.

I'm using vsftpd 1.2.1



When I create the dummy user, I can leave the Home Directory blank right?


Thanks again.

Last edited by stasjohn; 08-17-2004 at 10:05 PM.
 
Old 08-17-2004, 10:07 PM   #6
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
No, the home directory needs to be /var/www or if that doesn't work, try /var/www/html.

I'm not familiar with vsftpd.... I'm a proftpd man, myself, but it should still work the same, I believe.
 
Old 08-18-2004, 07:47 AM   #7
stasjohn
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Original Poster
Rep: Reputation: 0
sweet!

Thats what it was, I didn't give the user a home directory. Works fine now! Thanks man.
 
  


Reply


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
Details about default web Browser & default Email client sudhasmyle Linux - Software 4 06-15-2006 11:45 AM
Setting Up Web and FTP Server tobrien Linux - Networking 24 04-12-2005 01:34 AM
Setting The Default Web Browser FrostBot Linux - Software 5 11-04-2004 07:55 PM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 02:26 AM
setting default page size and default tray lived4eva Linux - General 1 11-04-2003 02:39 PM


All times are GMT -5. The time now is 06:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration