Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd July 2009, 12:54
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default 500 internal error if files has write permission in the group

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.
Reply With Quote
Sponsored Links
  #2  
Old 27th July 2009, 11:38
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

Please, anybody?
Reply With Quote
  #3  
Old 27th July 2009, 11:45
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

what does your apache error log tell you when you get the 500 error?
Reply With Quote
  #4  
Old 27th July 2009, 12:02
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
Default

This is one of the security mechanisms of suphp, you can change this in the suphp.conf file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 27th July 2009, 12:14
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

Okay, where do i find it?
Reply With Quote
  #6  
Old 27th July 2009, 12:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
Default

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
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 27th July 2009, 12:52
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

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
Reply With Quote
  #8  
Old 27th July 2009, 12:53
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
Default

Quote:
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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 27th July 2009, 12:59
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

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 :/
Reply With Quote
  #10  
Old 27th July 2009, 13:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
 
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
ISPConfig Installation error linuxuser1 Installation/Configuration 4 26th February 2008 06:38
ISPConfig 2.2.10 released till General 70 7th March 2007 18:25
ispconfig and mambo shajazzi Installation/Configuration 70 28th March 2006 19:29


All times are GMT +2. The time now is 16:42.


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