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 19th January 2012, 12:25
TheRudy TheRudy is offline
Senior Member
 
Join Date: Dec 2005
Posts: 216
Thanks: 1
Thanked 7 Times in 5 Posts
Default suPHP, proftpd, permissions problem

Hey guys,

Need a little help as I'm stuck.

I have a custom setup on the server and proftpd running (only when required).

The folder structure for websites is like this:

/home/www/domain.tld/public_html

www = owner: www_users, group: www_users
domain.tld = owner: www_users, group: www_users
public_html = owner: www_users, group: www_users

All sites have the same owner and are in the same group as above.

Now I had to install suPHP which works fine.

For each site, I created a new user for proftpd and added the user to group www_users. So that the required sites (just a few of them) have their own username/password for ftp login.

Of course the problem here are the permissions.

If I leave it as it is, suPHP is working fine, proftpd can login, view files but cannot upload (550 permission denied error).

If I change (chown -R ftpuser1:www_users *) for a domain (public_html folder) the owner to "ftpuser1", group as "www_users", FTP is working fine, I can upload, delete,...

But the website gives the 500 error:
Code:
[Thu Jan 19 10:12:47 2012] [warn] Directory /home/www/domain.tld is not owned by ftpuser1
Even if I chown "domain.tld" folder, suphp still gives me the above warn.

I can't figure out how to convince suphp to allow ftpuser1 as the owner.

/etc/suphp/suphp.conf
Code:
[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www-data

;Path all scripts have to be in
docroot=/home/www

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0022

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


[handlers]
;Handler for php-scripts
application/x-httpd-php=php:/usr/bin/php-cgi

;Handler for CGI-scripts
x-suphp-cgi=execute:!self
Current folder structure (suphp works, proftpd gives 550 error):
Code:
drwxr-xr-x  3 www_users www_users 4096 Aug 13  2009 domain.tld
Inside "domain.tld":
Code:
drwxr-xr-x 21 www_users www_users 4096 Jan 19 10:12 public_html
Inside the "public_html" all files and folders are "www_users" owner and group.

id ftpuser1:
Code:
uid=5003(ftpuser1) gid=5001(www_users) groups=5001(www_users)
Need help please.
Reply With Quote
Sponsored Links
  #2  
Old 19th January 2012, 15:10
TheRudy TheRudy is offline
Senior Member
 
Join Date: Dec 2005
Posts: 216
Thanks: 1
Thanked 7 Times in 5 Posts
 
Default

Setting root:root to /home/www solved the problem!
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
MySQL Error Nolan Installation/Configuration 13 27th November 2014 06:04
mail.err warnings and some mail unable to receive HellMind General 4 8th October 2010 20:57
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 14:58
Still problem with proftpd toxical Server Operation 1 27th April 2009 19:21
permissions problem with sub folders of network drives tommo Server Operation 0 20th June 2007 16:50


All times are GMT +2. The time now is 00:47.


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