LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting up ftp for default web folder (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-ftp-for-default-web-folder-218717/)

stasjohn 08-17-2004 08:12 AM

setting up ftp for default web folder
 
:newbie:

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!

Donboy 08-17-2004 09:10 AM

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.

stasjohn 08-17-2004 08:52 PM

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!

Donboy 08-17-2004 09:02 PM

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?

stasjohn 08-17-2004 10:02 PM

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.

Donboy 08-17-2004 10:07 PM

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.

stasjohn 08-18-2004 07:47 AM

sweet!

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


All times are GMT -5. The time now is 02:57 PM.