#1  
Old 8th March 2011, 08:50
becks87 becks87 is offline
Junior Member
 
Join Date: Oct 2010
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
Exclamation File upload problems in PHP

Hi!

I have ISPConfig 2 installed on Ubuntu 10.04 server. My problem is that I have a php code in many of my own coded websites where customers can create folders and upload docs in it. The problem is that the main folder, which i created by FTP is working (i mean i can create dirs and files into it), but the created subfolders is not working, i cannot create another dirs or files in it. I found that the problem is in the privileges of the linux server, the parent dir created by customer:web# and the subfolders wwwdata:wwwdata. If i change manually the subfolders owner and group, it comes working. How can i make it work with the least administrative effort and not decreasing security. If there is any htaccess solution, it would be also acceptable but when i tried to solve this problem with it i always found an internal server error 500 message. But i'm not an expert in linux systems...
Please help!
Reply With Quote
Sponsored Links
  #2  
Old 8th March 2011, 09:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Switch from mod_php to suphp:

http://howtoforge.com/install-suphp-...2.20-and-above
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 8th March 2011, 09:45
becks87 becks87 is offline
Junior Member
 
Join Date: Oct 2010
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks for your reply. Before i starting to make drastic modifications in my apache server i want to know how it is affect the other customers code? Is it a risky operation to change? I also want to make this with the less drop-out to others. Moreover the link you got is for Ubuntu 7.10. Can it safely work on 10.04? I'm not an expert in this theme so i'm a bit frightened to make the server unstable or malfunctioning in php and cannot do the old config back. Thanks again for your help!
Reply With Quote
  #4  
Old 8th March 2011, 09:55
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
 
Default

Currently you use mod_php. mod_php is a apache module for PHP which runs the php processes under the apache user (www-data). This causes problems when you try to upload files with PHP as the apache user and web / FTP user are different.

With suphp, the php scripts will be run under the website user (which is the same then the FTP user). This is also mosre secure then using mod_php as every website runs php processes under different users then.

The main drawback is that suphp is a bit slower as php processes were started as cgi and that you can nout use settings like php_admin or php_flag in .htaccess files, in suphp you use custom php.ini files for that instead.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
files, folders, php, privileges, ubuntu

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
Webmin upgrade lishaw1968 Installation/Configuration 15 26th August 2010 15:23
PHP code for PHPMyAdmin is not parsed parkerj Installation/Configuration 3 26th May 2009 13:40
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 08:20
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 10:20
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 03:40


All times are GMT +2. The time now is 04:15.


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