The only way i found to run them (and a lot more packages) was to chown the folder where they will be running to apache:apache, then chmod them to 777. Is it the only one way?
That's to be expected. Many CMS's need the ability to write into a subdirectory and the problem then becomes a file system permissions issue. As you point out, one or the other techniques (or both) will solve it: * Do a chmod 777 on the subdirectory that needs to be written into. There are, of course, some security concerns with giving world-write access like this. * Change the ownership of the subdirectory to whatever user/group Apache is running as (this varies depending on the particular distro used). Myself, I prefer the latter technique, though the former is "easier".
No, thats the easiest but most insecure way. The better solution is to run the PHP scripts under the webadmin user with either SuPHP or SuEXEC + CGI-PHP or PHP as fastcgi.
mmm but can i choose diferent users for every virtual site? thats the way ill do it on windows, but i dont know if apache can do it. About the chmod and chown, they only run fine if i do both.. i dont know why..
Haaa , ok, anyway i dont understand as you can see im a windows developer, im here just because windows has no secure email server... But.. what you say is running the site under the vsite admin user, can ispconfig create this configuration? what happens if the admin user change?
It'd be unusual for that user to change; off the top of my head the only way that user would change is to delete the account and recreate it. Try this: Do a cd into the user's "web" subdirectory, e.g. "cd /home/www/web2/web". Get the ownership of the files there Code: ls -l index.php -rw-r--r-- 1 web2_intnsred web2 5831 Jan 17 20:41 index.php From the above we see that the username is "web2_intnsred" and the group is "web2". The directory can then be chown'ed to that user/group with a "chmod web2_intnsred:web2 DirectoryToChange" command.
ISPCOnfig supports SuEXEC + cgi-PHP out of the box and the other configurations by adding some additional config lines in the apache directives field of the website. Then the scripts are run under the new admin user. ISPConfig changes the admin ownership of the files automatically.