I follow the "How To Set Up suPHP On A Debian Based ISPConfig Server" to setup the suPHP.
Yes, I can install the suPHP but when I upload a photo to my website. The php scripts will create a folder with access right 600 only and the upload photo also is 600 only. So that I can't see the photo on my browser.
I have already set the suphp.conf to :
; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false
What's wrong with my suPHP, How can I fix this problem? In fact, I want to suPHP to chmod 755 or 644 to the created folder and files.
This depends onyl on your PHP script and not on SuPHP, use the chmod function in PHP to change the mode to suit your needs.
Hi Till,
I have looked all over the php scripts, this is not related to the php script, because the script is already used 755 to set the permission.
Any other suggestion to fix this problem?
Thank you!
Besides, I find the if the script chmod(filesorpath, 755), the output permission will be 0700.
If the script use imagejpeg(), the permission of the output file will be 0600.
Which configuration file should I modify it to fix this problem.
The created folder or file owner is web1_user1:web1
Posts: 32,071
Thanks: 697
Thanked 4,249 Times in 3,261 Posts
Quote:
chmod(filesorpath, 755)
In the php chmod command, you should always use chmod(filesorpath, 0755) and not chmod(filesorpath, 755), if the 0 is missing, the command might fail or set wrong permissions.
Quote:
Which configuration file should I modify it to fix this problem.
I think there are only 2 possible files. The suphp.ini and the php.ini file where such a config value might be set.
Yes! I just ignore the '0' here. But inside the scripts, it use 0755.
I have tried install a fresh Ubuntu again. I just put the a test script inside it,
which is as the following (test.php)
<?php
chmod("test1.php", 0755);
mkdir("test", 0755);
?>
I find that the first command is working properly which can change the permission of test1.php to 0755.
But the second one can only created a folder with 0700 only.
I have checked the suphp.ini and php.ini and can't find any hits to change permission.
Recent comments
12 hours 32 sec ago
13 hours 15 sec ago
16 hours 47 min ago
18 hours 1 min ago
21 hours 37 min ago
1 day 4 hours ago
1 day 13 hours ago
1 day 15 hours ago
2 days 6 hours ago
2 days 8 hours ago