Re: [PHP] MkDir Help

2008-10-23 Thread Yeti
If you are prior PHP5 write your own recursive mkdir function [1] as posted on this list a while ago. [1] http://marc.info/?l=php-generalm=121926660406116w=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] MkDir Help

2008-10-22 Thread Jason Todd Slack-Moehrle
Hi All, I want to make a directory on my web server programatically when my code to create a new user runs. I am running PHP 5.2.5 on Linux. I am running: $dirToCreate = ...$_SESSION['s_USER_URL']; mkdir($dirToCreate, 0777, TRUE); // create the directory for the user $dirToCreate is:

Re: [PHP] MkDir Help

2008-10-22 Thread Stut
On 23 Oct 2008, at 00:33, Jason Todd Slack-Moehrle wrote: I want to make a directory on my web server programatically when my code to create a new user runs. I am running PHP 5.2.5 on Linux. I am running: $dirToCreate = ...$_SESSION['s_USER_URL']; mkdir($dirToCreate, 0777, TRUE); // create

Re: [PHP] MkDir Help

2008-10-22 Thread Ashley Sheridan
On Wed, 2008-10-22 at 16:33 -0700, Jason Todd Slack-Moehrle wrote: Hi All, I want to make a directory on my web server programatically when my code to create a new user runs. I am running PHP 5.2.5 on Linux. I am running: $dirToCreate = ...$_SESSION['s_USER_URL'];

Re: [PHP] MkDir Help

2008-10-22 Thread Jason Todd Slack-Moehrle
Hi, Well, as your mkdir is saying you can only have 2 parameters, I'm guessing you're not yet running PHP 5. Also, as 0777 is the default mode, you can omit this from your code to leave only one argument. You didn't say the exact error you're getting when you omit the third argument. My guess

Re: [PHP] MkDir Help

2008-10-22 Thread Jim Lucas
Jason Todd Slack-Moehrle wrote: Hi All, I want to make a directory on my web server programatically when my code to create a new user runs. I am running PHP 5.2.5 on Linux. I am running: $dirToCreate = ...$_SESSION['s_USER_URL']; mkdir($dirToCreate, 0777, TRUE); // create the directory for

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: Hi, Rob: I forgot to mention that I have been using yum install. I have reinstalled the entire thing, put back all the packages, and then I went to /var and did a chmod -R 777 var, and then did a [EMAIL PROTECTED] var]# chown -R apache:apache . Interestingly, I do

RE: [PHP] mkdir permission errors

2008-07-15 Thread Wei, Alice J.
-Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 4:06 AM To: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: Hi, Rob: I forgot to mention that I have been using yum install. I have reinstalled

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 4:06 AM To: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: Hi, Rob: I forgot to mention that I have been using yum install. I

RE: [PHP] mkdir permission errors

2008-07-15 Thread Wei, Alice J.
From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 4:06 AM

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July

RE: [PHP] mkdir permission errors

2008-07-15 Thread Wei, Alice J.
From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford

Re: [PHP] mkdir permission errors

2008-07-15 Thread Daniel Brown
On Tue, Jul 15, 2008 at 7:05 AM, Wei, Alice J. [EMAIL PROTECTED] wrote: Do I really have to reinstall the entire Fedora? You may be a prime candidate for Windows. -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract!

Re: [PHP] mkdir permission errors

2008-07-15 Thread Wolf
Daniel Brown [EMAIL PROTECTED] wrote: On Tue, Jul 15, 2008 at 7:05 AM, Wei, Alice J. [EMAIL PROTECTED] wrote: Do I really have to reinstall the entire Fedora? You may be a prime candidate for Windows. Well, you *could* load Fedora on another machine, fully update it, and then go

Re: [PHP] mkdir permission errors

2008-07-15 Thread Robert Cummings
On Tue, 2008-07-15 at 09:06 +0100, Peter Ford wrote: Wei, Alice J. wrote: Hi, Rob: I forgot to mention that I have been using yum install. I have reinstalled the entire thing, put back all the packages, and then I went to /var and did a chmod -R 777 var, and then did a

RE: [PHP] mkdir permission errors

2008-07-15 Thread Robert Cummings
On Tue, 2008-07-15 at 08:16 -0400, Wei, Alice J. wrote: This portion is to answer Rob's question: [EMAIL PROTECTED] var]# ls -la total 92 drwxrwxrwx 22 root root 4096 2008-06-24 08:34 . drwxr-xr-x 21 root root 4096 2008-07-14 08:17 .. drwxrwxrwx 2 root root 4096 2008-06-24 08:25 account

RE: [PHP] mkdir permission errors

2008-07-15 Thread Wei, Alice J.
From: Robert Cummings [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 12:16 PM To: Wei, Alice J. Cc: Peter Ford; php-general@lists.php.net Subject: RE: [PHP] mkdir permission errors On Tue, 2008-07-15 at 08:16 -0400, Wei, Alice J. wrote: This portion

RE: [PHP] mkdir permission errors

2008-07-15 Thread Robert Cummings
On Tue, 2008-07-15 at 12:19 -0400, Wei, Alice J. wrote: From: Robert Cummings [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 12:16 PM To: Wei, Alice J. Cc: Peter Ford; php-general@lists.php.net Subject: RE: [PHP] mkdir permission errors On Tue

RE: [PHP] mkdir permission errors

2008-07-15 Thread Wei, Alice J.
From: Robert Cummings [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 12:16 PM To: Wei, Alice J. Cc: Peter Ford; php-general@lists.php.net Subject: RE: [PHP] mkdir permission errors On Tue, 2008-07-15 at 08:16 -0400, Wei, Alice J. wrote

RE: [PHP] mkdir permission errors

2008-07-15 Thread Wolf
Nope, I have set mine to 755, and it does not seem to be giving me any errors. This is the safer way to do it, right? Alice Alice, At this point, you need to re-install the OS or prepare to get your machine completely hacked and trashed. With your permissions that badly screwed up, it

[PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
Hi, Guys: I have a very strange incident here that may seem very stupid. Since the power went out last night, I have restarted my server. However, now the permission is never working right. I have set the permission of my htdocs folder iof my Apache server to 0755, and then started

Re: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 15:01 -0400, Wei, Alice J. wrote: Hi, Guys: I have a very strange incident here that may seem very stupid. Since the power went out last night, I have restarted my server. However, now the permission is never working right. I have set the permission of my htdocs

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
University Bloomington [EMAIL PROTECTED] From: Robert Cummings [EMAIL PROTECTED] Sent: Monday, July 14, 2008 3:07 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors On Mon, 2008-07-14 at 15:01 -0400, Wei, Alice J

RE: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 15:11 -0400, Wei, Alice J. wrote: Hi, The apache is running currently on root as the user. The parent directory, test, is set to 0755. I have no problems making new directories directly from the terminal prompt, and it does not give me user execution errors

RE: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 15:11 -0400, Wei, Alice J. wrote: Hi, The apache is running currently on root as the user. The parent directory, test, is set to 0755. These are permissions btw, and not ownerships. Ownerships denote user and group owners of the directory... specifically the

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
[EMAIL PROTECTED] From: Robert Cummings [EMAIL PROTECTED] Sent: Monday, July 14, 2008 3:21 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: RE: [PHP] mkdir permission errors On Mon, 2008-07-14 at 15:11 -0400, Wei, Alice J. wrote: Hi, The apache

RE: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 15:23 -0400, Wei, Alice J. wrote: Hi, Rob: This is the output: root 31232 0.0 0.0 4120 672 pts/1R+ 15:22 0:00 grep apache|httpd Does this help? Sorry... my bad, can you do the following: ps awxu | grep -E 'apache|httpd' I have grep

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
] From: Robert Cummings [EMAIL PROTECTED] Sent: Monday, July 14, 2008 3:35 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: RE: [PHP] mkdir permission errors On Mon, 2008-07-14 at 15:23 -0400, Wei, Alice J. wrote: Hi, Rob: This is the output: root 31232 0.0

RE: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 15:37 -0400, Wei, Alice J. wrote: Hi, Rob: Here is the updated version from the correct command: [EMAIL PROTECTED] htdocs]# ps awxu | grep -E 'apache|httpd' root 30957 0.0 0.5 27576 11016 ?Ss 14:27 0:00 /usr/sbin/httpd apache 30959 0.0 0.3

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
] From: Robert Cummings [EMAIL PROTECTED] Sent: Monday, July 14, 2008 3:42 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: RE: [PHP] mkdir permission errors On Mon, 2008-07-14 at 15:37 -0400, Wei, Alice J. wrote: Hi, Rob: Here is the updated

RE: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 15:49 -0400, Wei, Alice J. wrote: Hi, Rob: I did follow the instruction of putting in chown apache:apache htdocs. Now when I run the ls -la command, I get this: [EMAIL PROTECTED] apache]# ls -la total 68 drwxr-xr-x 15 root root4096 2008-06-24 09:36 .

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
: RE: [PHP] mkdir permission errors On Mon, 2008-07-14 at 15:49 -0400, Wei, Alice J. wrote: Hi, Rob: I did follow the instruction of putting in chown apache:apache htdocs. Now when I run the ls -la command, I get this: [EMAIL PROTECTED] apache]# ls -la total 68 drwxr-xr-x 15 root root

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wolf
Wei wrote: Hi, Rob: I forgot to mention that I have been using yum install. I have reinstalled the entire thing, put back all the packages, and then I went to /var and did a chmod -R 777 var, and then did a [EMAIL PROTECTED] var]# chown -R apache:apache . Interestingly, I

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
] From: Wolf [EMAIL PROTECTED] Sent: Monday, July 14, 2008 4:37 PM To: Wei, Alice J. Cc: Robert Cummings; php-general@lists.php.net Subject: RE: [PHP] mkdir permission errors Wei wrote: Hi, Rob: I forgot to mention that I have been using yum install. I have

Re: [PHP] mkdir permission errors

2008-07-14 Thread Daniel Brown
On Mon, Jul 14, 2008 at 4:37 PM, Wolf [EMAIL PROTECTED] wrote: $whoami=system('whoami'); echo $whoami; $pwd=system('pwd'); echo $pwd; That should tell you what ID you are and the path you are in. Conversely, so will this method: ?php echo `whoami`; echo `pwd`; ? -- /Daniel P.

Re: [PHP] mkdir permission errors

2008-07-14 Thread Daniel Brown
On Mon, Jul 14, 2008 at 4:45 PM, Wei, Alice J. [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] html]# php test.php root root/var/www/html /var/www/html Stop testing from the CLI when you need to see results for HTTP then. -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wolf
Alice: Bottom post like everyone else... Wei wrote: Hi, Wolf: Like I guessed, I am still defined as the root user. [EMAIL PROTECTED] html]# php test.php root root/var/www/html /var/www/html This is the output I have got from using your script. I have made a following quick

RE: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 16:45 -0400, Wei, Alice J. wrote: Hi, Wolf: Like I guessed, I am still defined as the root user. [EMAIL PROTECTED] html]# php test.php root root/var/www/html /var/www/html This is the output I have got from using your script. I have made a following quick

RE: [PHP] mkdir permission errors

2008-07-14 Thread Wei, Alice J.
This is the output I have got from using your script. I have made a following quick change: [EMAIL PROTECTED] var]# chown -R root:root . Not surprisingly, I am still not able to make a new directory using PHP with the HTTP. Could there be anything else I missed? I knew who you were when

RE: [PHP] mkdir permission errors

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 22:09 -0400, Wei, Alice J. wrote: This is the output I have got from using your script. I have made a following quick change: [EMAIL PROTECTED] var]# chown -R root:root . Not surprisingly, I am still not able to make a new directory using PHP with the HTTP.

[PHP] mkdir() Cannot Create Directories

2008-06-17 Thread Wei, Alice J.
Hi, I have a code here that I am intending to create new directories by creating a parent and then proceed on to create the children one by one. I am trying to create directories in the server I am running my script from as shown in the snippet below. My problem is that although the code

Re: [PHP] mkdir() Cannot Create Directories

2008-06-17 Thread Daniel Brown
On Tue, Jun 17, 2008 at 2:43 PM, Wei, Alice J. [EMAIL PROTECTED] wrote: Hi, [snip!] This is my PHP code: mkdir(C:/Inetpub/wwwroot/TPU/test/$id, 0755) or die (pCannot create directory C:/Inetpub/wwwroot/TPU/test/$id/p); What is strange is that I don't get permission denied errors, but I

Re: [PHP] mkdir() Cannot Create Directories

2008-06-17 Thread David Giragosian
On 6/17/08, Daniel Brown [EMAIL PROTECTED] wrote: On Tue, Jun 17, 2008 at 2:43 PM, Wei, Alice J. [EMAIL PROTECTED] wrote: Hi, [snip!] This is my PHP code: mkdir(C:/Inetpub/wwwroot/TPU/test/$id, 0755) or die (pCannot create directory C:/Inetpub/wwwroot/TPU/test/$id/p); What is

RE: [PHP] mkdir() Cannot Create Directories

2008-06-17 Thread Wei, Alice J.
== Alice Wei MIS 2009 School of Library and Information Science Indiana University Bloomington [EMAIL PROTECTED] From: Daniel Brown [EMAIL PROTECTED] Sent: Tuesday, June 17, 2008 2:54 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir

Re: [PHP] mkdir() Cannot Create Directories

2008-06-17 Thread Nitsan Bin-Nun
As far as I remember, when I was on shared windows I had something similar (no access to upload/create folders), the tech guy at the company i was hosting at changed something in my privileges and it solved it. You may have no creating privileges. On 17/06/2008, Wei, Alice J. [EMAIL PROTECTED]

[PHP] mkdir/exec(cacls) question....

2008-04-03 Thread Constance.Kan
Bishopsfield Road Fareham Hampshire PO14 1NH Tel: 01329 815200 Fax: 01329 822483 The content of this e-mail is the sole responsibility of the sender - Fareham College accepts no responsibility for its accuracy or the

Re: [PHP] mkdir, Shared Hosting?

2005-08-08 Thread hitek
More than likely, your host has safe mode on. Safe mode is a pain in the ass if you need to create directories or write to files, but seems to be the defacto standard for shared hosts using php. [EMAIL PROTECTED] wrote: Thanks, but I've tried that when I first got the Error message, it

Re: [PHP] mkdir, Shared Hosting?

2005-08-08 Thread Esteamedpw
Thanks, I thought that might have been it - but It's not... I wrote a support ticket and - now - I'm able to use mkdir as long as the Directories are chmoded to 755+ :) thanks to all who helped! In a message dated 8/8/2005 2:16:12 A.M. Central Standard Time, [EMAIL PROTECTED]

Re: [PHP] mkdir, Shared Hosting?

2005-08-07 Thread Burhan Khalid
[EMAIL PROTECTED] wrote: In a message dated 8/6/2005 10:59:44 P.M. Central Standard Time, [EMAIL PROTECTED] writes: As far as I know, it's not a shared hosting issue, but a permission issue. The site admin has not given the user under which your php scripts run permission to create

Re: [PHP] mkdir, Shared Hosting?

2005-08-07 Thread Esteamedpw
Thanks, but I've tried that when I first got the Error message, it still gave me the error. Thanks though! In a message dated 8/7/2005 1:29:26 A.M. Central Standard Time, [EMAIL PROTECTED] writes: Open up your FTP client and log into your website, then change the permissions on your

[PHP] mkdir, Shared Hosting?

2005-08-06 Thread Esteamedpw
Hi, I'm using Shared Hosting and I was told - then I learned from trial and error - that you can't use mkdir on Shared Hosting... is this *100%* true? is there a way around it? I get: Warning: mkdir(/home/***/public_html/test/): Permission denied in /home/***/public_html/test.php on

RE: [PHP] mkdir, Shared Hosting?

2005-08-06 Thread Robbert van Andel
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, August 06, 2005 8:53 PM To: php-general@lists.php.net Subject: [PHP] mkdir, Shared Hosting? Hi, I'm using Shared Hosting and I was told - then I learned from trial and error - that you can't use mkdir on Shared Hosting

Re: [PHP] mkdir, Shared Hosting?

2005-08-06 Thread Esteamedpw
In a message dated 8/6/2005 10:59:44 P.M. Central Standard Time, [EMAIL PROTECTED] writes: As far as I know, it's not a shared hosting issue, but a permission issue. The site admin has not given the user under which your php scripts run permission to create directories and most likely

[PHP] mkdir security concern

2005-01-20 Thread kids_pro
Hi there, I want to create a script. When user register I want to create a folder : users\new_user_folder\images The purpose is that I want to allow them to upload image to this image folders. What sort of permission should I give to each folder Root: users, new_user_folders, and images

Re: [PHP] mkdir security concern

2005-01-20 Thread Marek Kilimajer
kids_pro wrote: Hi there, I want to create a script. When user register I want to create a folder : users\new_user_folder\images The purpose is that I want to allow them to upload image to this image folders. What sort of permission should I give to each folder Root: users, new_user_folders,

Re: [PHP] mkdir security concern

2005-01-20 Thread kids_pro
So your suggestion is that I should create an ftp account and use this account to create folder structure for user right? I still not sure about the permission to set. If I set 0755 how do OS know who is the owner? May be I think too much. But let say I use ftp account: ftp1 to create folder

Re: [PHP] mkdir() permissions

2004-08-19 Thread Richard Whitney
Dear List! Anyone out there using cPanel? Perhaps you could instruct me as to how to rebuild PHP, assuming we have similar file structure, such that cPanel seems to do. Many kind regards! Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] mkdir() permissions

2004-08-18 Thread Percy Cabello
Hi I am new to PHP and I'm trying that my script checks if a directory exists and if not, it should create it. I'm doing it with mkdir() but it returns this error message: Warning: mkdir(0): Permission denied in /xx on line 32 I wonder what kind of permissions should I set. This should be

Re: [PHP] mkdir() permissions

2004-08-18 Thread Matthew Sims
Hi I am new to PHP and I'm trying that my script checks if a directory exists and if not, it should create it. I'm doing it with mkdir() but it returns this error message: Warning: mkdir(0): Permission denied in /xx on line 32 I wonder what kind of permissions should I set. This

RE: [PHP] mkdir after mkdir

2004-06-07 Thread Uttam
to create subdirectory. Regards, -Original Message- From: Gerben [mailto:[EMAIL PROTECTED] Sent: Sunday, June 06, 2004 23:39 To: [EMAIL PROTECTED] Subject: Re: [PHP] mkdir after mkdir Unfortunately my server has no ftp (but SSH). It makes much sence what you said, but how can PHP (with uid

[PHP] mkdir after mkdir

2004-06-06 Thread Gerben
Hello, I have a problem with the mkdir function. I'm trying to make a seperate folder every photoalbum. inside I want to create another folder ('.../thumbnails/') for, you can guess, the thumbnails. At first it didn't work at all: Warning: mkdir() failed (Permission denied) in

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Daniel Clark
I think PHP and mkdir() is using the web servers rights. So the web server would need rights to create directories. Hello, I have a problem with the mkdir function. I'm trying to make a seperate folder every photoalbum. inside I want to create another folder ('.../thumbnails/') for, you can

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Marek Kilimajer
Gerben wrote: Hello, I have a problem with the mkdir function. I'm trying to make a seperate folder every photoalbum. inside I want to create another folder ('.../thumbnails/') for, you can guess, the thumbnails. At first it didn't work at all: Warning: mkdir() failed (Permission denied) in

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Gerben
I have those rights since the first dir is created. the problem is that the 2nd is not created Daniel Clark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I think PHP and mkdir() is using the web servers rights. So the web server would need rights to create directories. Hello,

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Gerben
Unfortunately my server has no ftp (but SSH). It makes much sence what you said, but how can PHP (with uid=48) make a directory with uid=1042. both folder are (to be) made the same script, but only one is (with uid=1042). This is what makes it very peculiar. I think I have skip the idea of

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Kevin Murphy
I'm still kind of a newbie at this, but couldn't you accomplish this by doing each MKDIR separately with a series of ELSE/IF statements. The basic logic would be: Check if parent DIR exists. If not, create one and then go on If yes: Check if Child DIR Exists

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Marek Kilimajer
Gerben wrote: Unfortunately my server has no ftp (but SSH). It makes much sence what you said, but how can PHP (with uid=48) make a directory with uid=1042. both folder are (to be) made the same script, but only one is (with uid=1042). This is what makes it very peculiar. I think I have skip the

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-29 Thread raisinlove
The work-around is to create the directory outside of your web application from your regular account. Or if you are allowed to run cgi scripts and these are set up via cgiwrapper or suExec to run as your own user id, use this to create the directory. Once created with the right owner, you can

[PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Hi, I'm having trouble understanding why I can create and delete directories with my script via mkdir and rmdir, but not simply being able to read them with opendir or readdir? For example, when I attempt to access these directories with opendir, I get this error message: Warning: opendir():

[PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Hi, I'm having trouble understanding why I can create and delete directories with my script via mkdir and rmdir, but not simply being able to read them with opendir or readdir? For example, when I attempt to access these directories with opendir, I get this error message: Warning: opendir():

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread Jason Wong
On Saturday 28 February 2004 22:47, raisinlove wrote: Hi, I'm having trouble understanding why I can create and delete directories with my script via mkdir and rmdir, but not simply being able to read them with opendir or readdir? Are you saying that you can create a directory using mkdir()

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread Rasmus Lerdorf
This is normal. You are allowed to create the directory because the directory you are creating it in is owned by the same user id that owns the script calling mkdir(). However, since your web server runs as some other user the owner of the newly created dir will be that user and not your own so

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Rasmus Lerdorf wrote: This is normal. You are allowed to create the directory because the directory you are creating it in is owned by the same user id that owns the script calling mkdir(). However, since your web server runs as some other user the owner of the newly created dir will be that

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Surely if there is a work-around then safe mode would not be doing its job properly? Well this was part of the purpose of my post, before Rasmus explained it, I didn't understand why I couldnt access a directory I had created. I was hoping for a function which would achieve the same purpose but

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread Rasmus Lerdorf
On Sat, 28 Feb 2004, raisinlove wrote: Surely if there is a work-around then safe mode would not be doing its job properly? Well this was part of the purpose of my post, before Rasmus explained it, I didn't understand why I couldnt access a directory I had created. I was hoping for a

[PHP] mkdir with PHP 4.3.4 and IIS 5.0 on Windows 2000

2003-11-18 Thread Dang Nguyen
I have a peculiar problem in one of my scripts. I cannot mkdir from the script, but from a test script, the same exact code works. test.php contains: ? include('func/mkdirs.php'); // this function recursively checks and create a directory tree. I know it works fine. $directory =

RE: [PHP] mkdir with PHP 4.3.4 and IIS 5.0 on Windows 2000

2003-11-18 Thread Jay Blanchard
[snip] mkdirs($directory,0755); [/snip] should be mkdir($directory,0755); make sure the script has permission to make a directory, most scripts run as 'nobody' and 'nobody' does not have permission to create a directory http://us3.php.net/mkdir -- PHP General Mailing List

RE: [PHP] mkdir with PHP 4.3.4 and IIS 5.0 on Windows 2000

2003-11-18 Thread Dang Nguyen
: [PHP] mkdir with PHP 4.3.4 and IIS 5.0 on Windows 2000 [snip] mkdirs($directory,0755); [/snip] should be mkdir($directory,0755); make sure the script has permission to make a directory, most scripts run as 'nobody' and 'nobody' does not have permission to create a directory http://us3.php.net

RE: [PHP] mkdir with PHP 4.3.4 and IIS 5.0 on Windows 2000

2003-11-18 Thread Jay Blanchard
[snip] In my case, I've created a function called mkdirs that recursively checks and does a mkdir on a given path. So, if any of the folders in a given path don't exist, then they will get created. I include this at the top via include('func/mkdirs.php');. I've used this mkdirs function in

[PHP] Mkdir() and fdopen()

2003-03-05 Thread ML
When trying to create files/directories with PHP, in terms of the system, who would be the user actually performing those actions? Would it be the nobody user which runs the apache web daemons? I am trying to figure out a safe way to make files writeable, but hopefully chown-ing those files/dirs

[PHP] mkdir(blah,0777)

2003-01-07 Thread rw
I have an interesting situation! I get a dir to be made - no problem, but I want it to have the permissions 0777. When I look in the directory that was just created (blah drwxr-x---) are the permissions. This is not acceptable! Lucy, you got some splainin to do! Thanks for your help RW --

Re: [PHP] mkdir(blah,0777)

2003-01-07 Thread Jason Wong
On Wednesday 08 January 2003 12:05, [EMAIL PROTECTED] wrote: I have an interesting situation! I get a dir to be made - no problem, but I want it to have the permissions 0777. When I look in the directory that was just created (blah drwxr-x---) are the permissions. Look at umask(). --

Re: [PHP] mkdir(blah,0777)

2003-01-07 Thread rw
Thank you, Jason! Quoting Jason Wong [EMAIL PROTECTED]: ### On Wednesday 08 January 2003 12:05, [EMAIL PROTECTED] wrote: ### I have an interesting situation! ### ### I get a dir to be made - no problem, but I want it to have the ### permissions ### 0777. When I look in the directory that was

[PHP] mkdir() makes dir, but with wrong owner

2002-12-20 Thread Mirza Muharemagic
Hi, i had a few problems with mkdir() ane uploading files using php. i have a simple script, which is making a dir. but everytime, it makes a dir with totally wrong user. chown wont work. any expirience with this?? i have found some older posts considering this, but no real

RE: [PHP] mkdir() makes dir, but with wrong owner

2002-12-20 Thread John W. Holmes
i had a few problems with mkdir() ane uploading files using php. i have a simple script, which is making a dir. but everytime, it makes a dir with totally wrong user. chown wont work. any expirience with this?? i have found some older posts considering this, but no real

Re: [PHP] mkdir() makes dir, but with wrong owner

2002-12-20 Thread Marek Kilimajer
Another option is to use ftp functions. John W. Holmes wrote: i had a few problems with mkdir() ane uploading files using php. i have a simple script, which is making a dir. but everytime, it makes a dir with totally wrong user. chown wont work. any expirience with this?? i have found

[PHP] mkdir()

2002-11-08 Thread Edward Peloke
I have been using the mkdir function sucessfully on my windows test machine, but when I uploaded my pages to my hosting server (which is linux) I get a permission error when the mkdir function is called. I know I can create directories because I can do it fine when I am using ws-ftp uploading

Re: [PHP] mkdir()

2002-11-08 Thread Marco Tabini
The problem is that your webserver is not running as you...it's running under a common user (probably nobody or apache) and that user does not--and cannot--have access to your folder for security reasons. You can try creating the directory through ftp via PHP. Marco --

Re: [PHP] mkdir and directory permissions

2002-10-25 Thread Jason Wong
On Friday 25 October 2002 06:51, Matias Silva wrote: Hi-ya all, here's a quickie... In my script I create a directory (mysql.backup.timestamp/) within a directory called backup/. I use the function mkdir(mysql.backup.timestamp, 0777); and it shows the permissions as after the

Re: [PHP] mkdir and directory permissions

2002-10-25 Thread Marek Kilimajer
Actualy, you can use chgrp(), but apache must be a member of the group you are changing to. Jason Wong wrote: On Friday 25 October 2002 06:51, Matias Silva wrote: Hi-ya all, here's a quickie... In my script I create a directory (mysql.backup.timestamp/) within a directory called

Re: [PHP] mkdir and directory permissions

2002-10-25 Thread Monty
Hi Jason, I have a follow-up question about mkdir. If the files created by mkdir are owned by 'nobody', does that create a security risk for those files? If so, how does one get around accepting files via an upload form that are assigned to a user other than 'nobody'? Monty -- PHP General

Re: [PHP] mkdir and directory permissions

2002-10-25 Thread @ Edwin
Hello, Just a few comments... And no, I'm not Jason :) Monty [EMAIL PROTECTED] wrote: Hi Jason, I have a follow-up question about mkdir. If the files created by mkdir are owned by 'nobody', does that create a security risk for those files? No, not really. If so, how does one get around

[PHP] mkdir and directory permissions

2002-10-24 Thread Matias Silva
Hi-ya all, here's a quickie... In my script I create a directory (mysql.backup.timestamp/) within a directory called backup/. I use the function mkdir(mysql.backup.timestamp, 0777); and it shows the permissions as after the function executes: drx--t 2 nobodydaemon1024

[PHP] mkdir() failed: Permission denied

2002-09-28 Thread Phil Powell
Ok, I am stuck. I am trying to create a folder in the same directory as process.php and then use move_uploaded_file($FILES['myImage]['tmp_name']) and it constantly fails: mkdir() failed (Permission denied) Here is my code: ? $willChangeLayout = 1; $isEmptyLayoutValues = 1; foreach

RE: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread John W. Holmes
PROTECTED] Subject: [PHP] mkdir() failed: Permission denied Ok, I am stuck. I am trying to create a folder in the same directory as process.php and then use move_uploaded_file($FILES['myImage]['tmp_name']) and it constantly fails: mkdir() failed (Permission denied) Here is my code

Re: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread Phil Powell
, 2002 4:22 PM Subject: RE: [PHP] mkdir() failed: Permission denied Whatever user your web server is running as needs to have permission to write to that directory that you are trying to make the new one in. ---John Holmes... -Original Message- From: Phil Powell [mailto:[EMAIL

Re: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread Sascha Braun
- Original Message - From: Sascha Braun [EMAIL PROTECTED] To: Phil Powell [EMAIL PROTECTED] Sent: Saturday, September 28, 2002 3:53 PM Subject: Re: [PHP] mkdir() failed: Permission denied You have to be the owenr too and maybe set the permission to 755. Ok, I am stuck. I am trying

RE: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread John W. Holmes
_YOU_ don't need write permissions, the web server does ---John Holmes... -Original Message- From: Phil Powell [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 4:24 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] mkdir() failed: Permission denied

Re: [PHP] mkdir() failed: Permission denied

2002-09-28 Thread Phil Powell
mkdir and uploading!! Phil - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Phil Powell' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, September 28, 2002 7:04 PM Subject: RE: [PHP] mkdir() failed: Permission denied _YOU_ don't need write permissions, the web server

  1   2   >