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 17th December 2006, 08:26
GaulHahn GaulHahn is offline
Junior Member
 
Join Date: Dec 2006
Location: Mornington Peninsula, Australia
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default Pureftpd Permissions Problem

Firstly thanks for the excellent how to's on this site they are a really valuable source of info!.

I have followed the installation of Virtual Hosting With PureFTPd And MySQL here. I'm running this on Ubuntu 6.06.1 Server.

However i'm having problems with the permissions as follows:

If I create a user and log onto the ftp server it creates the relevant directory with the ftpuser:ftpgroup permissions which is fine and i can upload data, mkdir etc. However because Apache is running as www-data:www-data If I try to run anything that needs rwx to those directories (for example joomla) it is unable due to the permissions being that of the ftpuser:ftpgroup.

Obvioulsy if I chown the directories to www-data:www-data it fixes the problem and joomla can be used but then the ftpuser is unable to mkdir, upload data etc.

I'm guessing it something fairly simple but i'm still learning What am I missing?
Reply With Quote
Sponsored Links
  #2  
Old 18th December 2006, 14:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

A solution is to run either Apache as ftpuser:ftpgroup or Pureftpd as www-data:www-data.
__________________
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
  #3  
Old 19th December 2006, 14:07
GaulHahn GaulHahn is offline
Junior Member
 
Join Date: Dec 2006
Location: Mornington Peninsula, Australia
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks for your response Falko!

I discovered another way around this problem. By default (on Ubuntu 6.06.1 at least) /etc/pure-ftpd/conf/MinUID has a value of 1000

I set /etc/pure-ftpd/conf/MinUID to "1" which allows www-data UID 33 to log on to the FTP server. Then if I set the User in the MySQL database with UID and GID 33 it works fine.

On Ubuntu 6.06.1 pure-ftpd-mysql runs this:

/usr/sbin/pure-ftpd-mysql -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -u 1000 -E -A -O clf:/var/log/pure-ftpd/transfer.log -j -B

From the man pages:

- '-u <uid>': Don't allow uids below <uid> to log in. '-u 1' denies access
to root (safe), '-u 100' denies access to virtual accounts on most Linux
distros.

Cheers

Last edited by GaulHahn; 19th December 2006 at 14:09.
Reply With Quote
  #4  
Old 15th October 2008, 19:49
_X_ _X_ is offline
Senior Member
 
Join Date: Oct 2008
Posts: 247
Thanks: 8
Thanked 37 Times in 35 Posts
Question

can this be done for proftpd in:
/etc/proftpd/proftpd.conf

# Set the user and group that the server normally runs at.
User www-data
Group www-data
Reply With Quote
  #5  
Old 16th October 2008, 14:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Theoretically yes, but why would you want to do this?
__________________
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
  #6  
Old 16th October 2008, 15:18
_X_ _X_ is offline
Senior Member
 
Join Date: Oct 2008
Posts: 247
Thanks: 8
Thanked 37 Times in 35 Posts
Default

to alow admin user for site that runs joomla to modify files with ftp connection in joomla instalation because they are all www-data:www-data ?

is this unsecure procedure?
Reply With Quote
  #7  
Old 17th October 2008, 13:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
 
Default

To do this, you'd have to log in as www-data in ProFTPd; changing user and group in proftpd.conf doesn't help.
__________________
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
The Following User Says Thank You to falko For This Useful Post:
_X_ (17th October 2008)
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
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
Strange email problem for one of my domains... any help appreciated paulrobert_a Installation/Configuration 5 9th August 2010 14:15
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
permissions problem on the /var/www/webXX folders Ovidiu General 1 8th August 2006 17:46
Postfix+MySQL Problem jasutton Installation/Configuration 1 15th June 2006 16:06


All times are GMT +2. The time now is 11:12.


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