#1  
Old 17th March 2011, 14:12
trexen trexen is offline
Senior Member
 
Join Date: Jun 2008
Location: Stockholm
Posts: 169
Thanks: 15
Thanked 3 Times in 2 Posts
Exclamation problem whit rights in /web/

Hi,
Got a customer that complain that his PHP script, se below:

"<?
copy('textfile.php', 'textfile_copy.php');
?>"

then i got this error in webbrowser:

"Warning: copy(textfile_copy.php) [function.copy]: failed to open stream: Permission denied in /var/www/web38/web/copy.php on line 2"

Webroot permission is:

"drwxrwxr-x 11 web38_admin web38 4096 2011-03-17 14:03 web"

If i make a new dir under /wweb/prov/ anf make it chmod 777 it works and the new file getting the following permission and user

"-rw-r--r-- 1 www-data www-data 17 2011-03-17 14:05 textfile_copy.php"


My question is how i can change this so i dont need to use chmod 777?


regards
Marcus Lindberg



Is this tread the solution om my problem also?
http://www.howtoforge.com/forums/showthread.php?t=51782
if it is how would it effect the websites under the installation, and hpw do i revert the installation if it fail?

Last edited by trexen; 17th March 2011 at 14:48.
Reply With Quote
Sponsored Links
  #2  
Old 18th March 2011, 14:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

You must either chmod /var/www/web38/web/copy.php to 777, or change ownership so that the file is owned by the Apache user (www-data on Debian and Ubuntu).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 18th March 2011, 14:51
trexen trexen is offline
Senior Member
 
Join Date: Jun 2008
Location: Stockholm
Posts: 169
Thanks: 15
Thanked 3 Times in 2 Posts
Default

ok, but if i chmod 777 to copy.php i get:

Warning: copy(textfile_copy.php) [function.copy]: failed to open stream: Permission denied in /var/www/web38/web/copy.php on line 2
......

and if i change to:
-rwxrwxrwx 1 www-data web38 48 2011-03-17 10:45 copy.php
i get this:

Warning: copy(textfile_copy.php) [function.copy]: failed to open stream: Permission denied in /var/www/web38/web/copy.php on line 2
.

i run Debian 5 and latest ispconfig

Last edited by trexen; 18th March 2011 at 14:52. Reason: update
Reply With Quote
  #4  
Old 19th March 2011, 18:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

You need to chmod or chown the directory /var/www/web38/web/ as well.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 28th March 2011, 08:38
trexen trexen is offline
Senior Member
 
Join Date: Jun 2008
Location: Stockholm
Posts: 169
Thanks: 15
Thanked 3 Times in 2 Posts
 
Default

so i need to change the directory /var/www/web38/web to chown www-data web38 and the permission can be the same "i hope" dont whant to change to chmod 777?

rgds
marcus
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
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
postfix/trivial-rewrite digitalage HOWTO-Related Questions 19 13th March 2013 19:02
Problem whit quota Centos 4.4 ISP 2.2.12 roghawas Installation/Configuration 7 30th May 2007 16:59
Problem whit instalation Centos 4.4 roghawas Installation/Configuration 5 12th May 2007 18:08
postfix mysql on fedora core5 igongora Installation/Configuration 7 17th April 2007 04:40


All times are GMT +2. The time now is 10:17.


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