Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th February 2007, 02:06
Jamesk5 Jamesk5 is offline
Junior Member
 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question about FTP/Apache

I'm just wondering how I need to go about letting both Apache and FTP system users have read and write access to some of my virtual host directories. I followed Falko's proftpd tutorial to setup proftpd with a mysql backend.
However, since I'm running wordpress (and I use it to upload alot of files) on a few different VHosts, I need to allow for access to the files by both apache and proftpd.

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 9th February 2007, 12:12
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,083
Thanks: 826
Thanked 5,396 Times in 4,240 Posts
Default

There are several possibilities:

1) create a group for each vhost, make all files group writable and make sure that all users that shall be able to write files are members of this group.

2) Use SuPHP to run your PHP scripts under the same user that you use for FTP.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 11th February 2007, 09:39
Jamesk5 Jamesk5 is offline
Junior Member
 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
1) create a group for each vhost, make all files group writable and make sure that all users that shall be able to write files are members of this group.

I've tried this - but it doesn't *seem* to be working. My FTP client is giving me permission errors saying it can't delete the file.
Reply With Quote
  #4  
Old 12th February 2007, 14:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Jamesk5
My FTP client is giving me permission errors saying it can't delete the file.
I guess the file was created by your Apache user?
The solution would be what Till posted under point 2.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 19th February 2007, 05:31
Jamesk5 Jamesk5 is offline
Junior Member
 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
I guess the file was created by your Apache user?
The solution would be what Till posted under point 2.
But if the group has read/write permissions on the file wouldn't *any* member of that group also be able to delete that file??
Reply With Quote
  #6  
Old 20th February 2007, 16:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Jamesk5
But if the group has read/write permissions on the file wouldn't *any* member of that group also be able to delete that file??
Yes, that's right.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 3rd March 2007, 07:43
Jamesk5 Jamesk5 is offline
Junior Member
 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
Yes, that's right.
If that's right, why isn't it working in my case? :P
I can't delete files created by another user of the same group as my ftp user, using my FTP client.
Reply With Quote
  #8  
Old 3rd March 2007, 12:05
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

To delete a file, the group must have write rights on the directory. So 775 and the same group in the above directory level.
Reply With Quote
  #9  
Old 4th March 2007, 11:34
Jamesk5 Jamesk5 is offline
Junior Member
 
Join Date: Apr 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by martinfst
To delete a file, the group must have write rights on the directory. So 775 and the same group in the above directory level.
I realise that, all the folders/files have the 775 and correct group applied through a chmod -R and chown -R
Reply With Quote
  #10  
Old 4th March 2007, 12:24
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
 
Default

Quote:
I realise that, all the folders/files have the 775 and correct group applied through a chmod -R and chown -R
then it should work
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
emails domains and co-domains question bug or a feature omadon Installation/Configuration 3 27th November 2006 10:17
Odd question for Falko Randy Installation/Configuration 1 16th October 2006 14:58
sendmail config question westb Server Operation 1 1st September 2006 17:00
Simple question... I think - re: multiple domains. lidocayne Installation/Configuration 1 17th July 2006 11:53
Really Basic Question !!! brainz Installation/Configuration 7 13th March 2006 23:20


All times are GMT +2. The time now is 18:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.