LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-16-2004, 12:14 PM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
FTP Permissions / Home Directory errors


Quick question,

I have a website in:

/home/httpd/vhosts/whatever.com/httpdocs

(bad spot, works, not the issue)

I made a directory under it called /members/membername.

If I hit www.mysite.com/members/membername, I get the default index file, and that is happy.

However when I FTP to my site, and login as the user, I get "Service not available, remote server has closed connection".

The user is the owner of members/membername, and I chmodded it to 777 just to see if that'd help, but no dice.

Is there another permission I need to set on this so that he can FTP into his home directory?

btw: I set his home dir to /home/httpd/vhosts/whatever.com/httpdocs/members/membername.

Thanks!

Last edited by Seventh; 06-16-2004 at 12:21 PM.
 
Old 06-16-2004, 01:42 PM   #2
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
What ftp server are you running? My last install of pure-ftp grabbed users from the system users. I guess you have to add them on the system.
 
Old 06-16-2004, 06:32 PM   #3
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Proftpd on RH9.

They're added in /etc/passwd, did an adduser, etc.
 
Old 06-17-2004, 12:00 AM   #4
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Try here, specifically section 2...

http://www.castaglia.org/proftpd/doc...-HOWTO-NAT.txt
 
Old 06-17-2004, 08:41 AM   #5
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Donboy
Try here, specifically section 2...

http://www.castaglia.org/proftpd/doc...-HOWTO-NAT.txt
Hmm, wrong link?

The server runs and connects fine, it's an account/permissions issue, not a NAT issue.
 
Old 06-17-2004, 11:23 AM   #6
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Man, I have no idea. If it's not NAT, then maybe something to do with your config file. Post it here and maybe an answer will surface.
 
Old 06-17-2004, 11:46 AM   #7
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Here's my proftpd.conf, the include file that it references is blank.

Code:
-sh-2.05b$ cat /etc/proftpd.conf
#
# To have more informations about Proftpd configuration
# look at : http://www.proftpd.org/
#

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName                      "ProFTPD"
ServerType      inetd
ServerType      inetd
DefaultServer                   on
<Global>
DefaultRoot     ~
AllowOverwrite          on
</Global>
DefaultTransferMode     binary
UseFtpUsers                     on

# Port 21 is the standard FTP port.
Port                            21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances                    30

#Following part of this config file were generate by PSA automatically
#Any changes in this part will be overwritten by next manipulation
#with Anonymous FTP feature in PSA control panel.

#Include directive should point to place where FTP Virtual Hosts configuratio
#preserved

ScoreboardFile /var/run/proftpd/scoreboard

# Primary log file mest be outside of system logrotate province

TransferLog /usr/local/psa/var/log/xferlog

#Change default group for new files and directories in vhosts dir to psacln

<Directory /home/httpd/vhosts>
        GroupOwner      psacln
</Directory>

Include /etc/proftpd.include
-sh-2.05b$
Again anything in /home/whoever works fine, but if I move it to /home/httpd/vhosts/whatever.com/httpdocs/members/membername, it won't let people login.

The reason for the long folder is so that people can upload things (pics, etc) and link to them, and /httpdocs is the only folder that apache can see.

Thanks again.
 
Old 06-17-2004, 12:04 PM   #8
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Hmmm.. well, here's mine. This works fine for me. Maybe there's something here you can use.

Code:
ServerName			"FTP Server"
ServerType			standalone
DefaultServer			on
RequireValidShell		off
TimeoutStalled			300
TimeoutNoTransfer		1000
TimeoutIdle			1000
UseReverseDNS			off
AllowRetrieveRestart		on
AllowForeignAddress		on
ServerIdent			Off
DefaultRoot ~
ListOptions -a
DisplayConnect /etc/proftpd/prelogin.msg
Port				21
Umask				022
MaxClients			50
MaxInstances			15
MaxClientsPerHost		3
MaxHostsPerUser			3
User				nobody
Group				nobody

<Directory />
	HideUser root
	AllowOverwrite	on
	HideNoAccess On
	<Limit ALL>
		AllowAll
	</Limit>
	<Limit SITE_CHMOD>
		AllowAll
	</Limit>
</Directory>
 
Old 06-18-2004, 09:54 AM   #9
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Are your home directories /home/username, or are they somewhere else?
 
Old 06-18-2004, 10:06 AM   #10
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Yeah, each one is /home/username, and I have a bunch.
 
Old 06-19-2004, 01:38 PM   #11
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
I'm trying to bury them underneath a single /home/username, like /home/username/stuff/morestuff/thefolderinquestion.

Not sure if that matters, really. :\
 
Old 06-19-2004, 02:25 PM   #12
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
I think all you need is to have each user's home directory specified in /etc/passwd and have all the levels chmod 755 all the way to their home directory... so you'll want to have /home /home/username /home/username/stuff (etc, all the way down to their actual home dir) all of them chmod 755.
 
  


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
proftpd anon permissions DuPHaLaC Linux - Software 1 10-16-2004 11:44 AM
proftpd and file permissions Moses420ca Linux - Security 1 12-08-2003 05:17 AM
proFTPD permissions messed ka_alucard Slackware 4 05-23-2003 03:53 AM
proftpd permissions niehls Linux - Software 2 05-02-2003 02:33 PM
Proftpd Permissions Nephlite Linux - Networking 6 02-08-2002 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration