Hi, I have a PHP site, which allows me to upload pictures. There's no trouble uploading the file, but the the file permissions on the picture is not "read by all groups", and the result is that i can't view the file in a browser. My first thought was the give the uploading PHP file permissions to write, but when i do that, i get an internal error 500. It's running in suPHP.
Almost all linux config files are in /etc. As the program is named suphp, you will find the file in the directory /etc/suphp/ And in case that you dont find a file on your server, just use the command locate. E.g.: locate suphp.conf
Found it, thanks, but: server1:/# locate suphp.conf -bash: locate: command not found The images is still only given read and write permissions for owner, and can't be viewed in the browser
Then this is a problem with your image upload script as the permissions of the file are set by the php script that uploads the file.
I use the same script which worked on another server, I've given the file chmod 777. It's a standard PHP (move_uploaded_file) script :/
Your problem is not the permissions of the upload script, your problem is that the upload script sets wrong permissions for the uploaded image file. Your upload script must contain a chmod command to set the permissions of the uploadedc image file correctly.
I've changed to modPHP and now everything seems to work fine. But it still bothers me why it won't automatically do the file permissions in suPHP..
I found the solution! This bug: http://bugtracker.ispconfig.org/index.php?do=details&task_id=813&string=&project=3&due[0]=27&status[0]=closed Was the one causing me the trouble. Thanks to an always helpfull Till. Offtopic: When i update my ISPConfig installation, which config files are overwritten? suphp.conf?, apache2.conf? the sites-default/ files?
If you select to overwrite the config files during setup then all config files that had been configured during initial setup will be overwritten.