HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Pureftpd Permissions Problem (http://www.howtoforge.com/forums/showthread.php?t=9147)

GaulHahn 17th December 2006 08:26

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 :rolleyes: What am I missing?

falko 18th December 2006 14:18

A solution is to run either Apache as ftpuser:ftpgroup or Pureftpd as www-data:www-data.

GaulHahn 19th December 2006 14:07

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 :)

_X_ 15th October 2008 19:49

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

falko 16th October 2008 14:51

Theoretically yes, but why would you want to do this?

_X_ 16th October 2008 15:18

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?

falko 17th October 2008 13:54

To do this, you'd have to log in as www-data in ProFTPd; changing user and group in proftpd.conf doesn't help.


All times are GMT +2. The time now is 17:19.

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