You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by ashok kumar <va...@yahoo.com> on 2006/08/08 08:10:49 UTC

How to create a directory in red hat linux using php

Hi,
   
  Iam having PHP working with Apache on RedHat Linux 9.
  From PHP Iam trying to create a directory using mkdir("/etc/owndir"); but iam getting the error warning: mkdir() failed (Permission denied)  in  /var/www/html/dircheck.php on line 4.
   
  please do help me in creating a directory.
   
  Regards
  Ashok.V


 		
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.

Re: How to create a directory in red hat linux using php

Posted by ashok kumar <va...@yahoo.com>.
Thankq Ron,
   Iam able to create the directory after changing the root permissions.
   
  Regards
Ashok.V

Ron Addie <ad...@usq.edu.au> wrote:
  ashok kumar wrote:     Hi,
   
  Iam having PHP working with Apache on RedHat Linux 9.
  From PHP Iam trying to create a directory using mkdir("/etc/owndir"); but iam getting the error warning: mkdir() failed (Permission denied)  in  /var/www/html/dircheck.php on line 4.
   
  please do help me in creating a directory.
This is something which needs to be done as root. You could
switch to root using the su command and create the directory
in a console. You would need to change the permissions
on the directory as well. The script would then probably work.

Alternatively, you could change the permissions on the directory
/etc. But this would open up /etc for undesirable access by
other users.

You should think carefully about the reason the directory is
needed. In most cases it is best if directories are created by
the web server as needed, because then it owns the directory in
question and would have the access it needs.

Ron.
     
  Regards
  Ashok.V

  
  
---------------------------------
  Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta. 


 		
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.

Re: How to create a directory in red hat linux using php

Posted by Ron Addie <ad...@usq.edu.au>.
ashok kumar wrote:

> Hi,
>  
> Iam having PHP working with Apache on RedHat Linux 9.
> From PHP Iam trying to create a directory using mkdir("/etc/owndir"); 
> but iam getting the error *warning: mkdir() failed (Permission 
> denied)  in  /var/www/html/dircheck.php on line 4.*
> ** 
> please do help me in creating a directory.

This is something which needs to be done as root. You could
switch to root using the su command and create the directory
in a console. You would need to change the permissions
on the directory as well. The script would then probably work.

Alternatively, you could change the permissions on the directory
/etc. But this would open up /etc for undesirable access by
other users.

You should think carefully about the reason the directory is
needed. In most cases it is best if directories are created by
the web server as needed, because then it owns the directory in
question and would have the access it needs.

Ron.

>  
> Regards
> Ashok.V
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail Beta. 
> <http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/handraisers> 




Re: How to create a directory in red hat linux using php

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
ashok kumar <va...@yahoo.com> wrote on 08/08/2006 02:10:49 AM:

> Hi,
> 
> Iam having PHP working with Apache on RedHat Linux 9.
> From PHP Iam trying to create a directory using 
> mkdir("/etc/owndir"); but iam getting the error warning: mkdir() 
> failed (Permission denied)  in  /var/www/html/dircheck.php on line 4.
> 
> please do help me in creating a directory.

I'm having a hard time imagining how this is even peripherally related to 
Xerces (or XML). If you have questions about or related to Xerces-J ask 
them here, but please direct questions like this to the appropriate 
mailing list.

> Regards
> Ashok.V
>  Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail Beta.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org