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.
Recent comments
1 day 2 hours ago
1 day 4 hours ago
1 day 16 hours ago
1 day 19 hours ago
1 day 23 hours ago
2 days 5 hours ago
2 days 15 hours ago
2 days 17 hours ago
3 days 1 hour ago
3 days 2 hours ago