LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-26-2006, 07:06 PM   #1
fooboo
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
Proftpd upload to a folder other than 'upload'


I'm using Gentoo with proftpd (plus apache2, php4, and perl).

What I need to be able to do is access /var/www/<hostname> via ftp so I can upload modifications to my web page and be able to access the updated page.

What I actually have working is the ability to upload to 'www/upload' but not '/www/<hostname>' so I can upload files to my webserver but I can't put them directly into the folder they're being served from and view the new pages straight away without needing to access the machine and move the files.

I have these lines in my proftpd.conf but I'm a total newbie so I'm not sure what it all means:

<Directory /var/www/*>
AllowOverwrite on
<Limit UPLOAD_DIR_ALLOW LIST NLST STOR STOU APPE RETR RNFR RNTO DELE MKD XMKD RMD XRMD SITE_CHMOD SITE_CHGRP STAT MDTM PWD XPWD SIZE CWD XCWD CDUP XCUP SITE >
AllowAll
</Limit>
<Limit UPLOAD_DIR_DENY>
AllowAll
</Limit>
</Directory>

Has anyone got any idea what I can do to remedy this?
 
Old 04-26-2006, 07:30 PM   #2
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
I also use ProFTPd and what I do to solve this is create individual account definitions that have the home directory be the "DocumentRoot" of any site I host. That way, when user 'x' logs in, the definition for user 'x' drops them in the root directory of their website, based on what I specified in proftpd.conf.

If you're looking for a single definition in proftpd.conf that will automagically drop people in the right place, I would imagine it's possible but I don't know how to do it.

Have you looked at the ProFTPd doc? Maybe read on the VirtualHost directive.

Peace...
 
Old 04-27-2006, 03:03 AM   #3
fooboo
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Original Poster
Rep: Reputation: 0
I've tried that, it does start me off in the right folder it's just that when I get there I still can't modify any of the files in it.

I've tried setting the folder to chmod 755 but that makes no difference.

I get a message saying 550 Permission denied when I try to delete or upload to it.

I'll try the <VirtualHost> idea thanks.

p.s. I actually use gproftpd too which makes changing proftpd stuff easier if anyone here hasn't heard of it.
 
Old 04-27-2006, 03:19 AM   #4
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Here is how I define access to accounts on my server:

<Anonymous /mnt/websites/mysite.com>
AnonRequirePassword on
User siteowner
Group sitegroup
<Directory /mnt/websites/mysite.com>
HideNoAccess on
HideGroup root
AllowOverwrite on
</Directory>
<Limit SITE_CHMOD>
AllowAll
</Limit>
</Anonymous>

and they are able to change permissions, etc.

Peace...
 
Old 04-27-2006, 07:51 PM   #5
fooboo
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Phew I got it sorted.

All the files and directories in my web folder bar the upload folder were originally set to only allow root to write to them. I had set the files to allow allow others to write but I hadn't set the directories to do so, now that I have I've got full access via ftp.

Thanks for the help, I've learned a bit more about proftpd in the process.
 
  


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
IglooFTP-PRO refuses to upload files in folder when I upload folder eBopBob Linux - Software 0 08-27-2004 05:52 AM
proftpd upload problem help help automicro Linux - Software 0 08-20-2003 08:32 PM
Proftpd upload problem kelper Linux - General 0 06-25-2003 08:40 PM
ProFTPd, all works except upload. vexer Linux - Software 0 06-17-2003 11:05 PM
Resuming upload with Proftpd JimKyle Linux - Networking 2 03-07-2002 10:30 AM

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

All times are GMT -5. The time now is 12:07 AM.

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