Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Kurt Lieber

On Thursday 25 October 2001 10:08, you wrote:
 ?
 $GalleryPHPName = Pins;
 mkdir (../$GalleryPHPName, 0775);
 ?

 Results in...

 MkDir failed (Permission denied)

When you use a file-related command (fopen, mkdir, etc.) you're executing 
that command under the same user-context that apache runs under. (usually 
nobody on shared servers)  So, you need to make sure that user nobody has 
write permissions on the parent directory where you're trying to create your 
directory.

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Mike Eheler

a) check to see if the user that apache is running as has access to the 
directory you're trying to write to.
b) try removing the quotes around 0775

Mike

Jeff Gannaway wrote:

?
$GalleryPHPName = Pins;
mkdir (../$GalleryPHPName, 0775);
?

Results in...

MkDir failed (Permission denied)

Any thoughts?

-Jeff Gannaway
___

Save 15% on 2002 Calendars and Holiday Cards!

http://www.AvantGifts.com
Discount Code: hopper22ct
Offer Good Through October 31, 2001
___ 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Chuck Theobald

Jeff,

If this script is running as nobody, or some other low-class user, and the
permissions on the directory in which you are attempting to create a
sub-directory do not allow the creation of the sub-directory by this user,
then mkdir will fail.

Say your script resides in 'php-stuff' with permissions 755 and the
owner/group is chuck/chuck.  No one but owner chuck (and root) will be able
to create a directory in this directory.  According to your script, you are
trying to create 'php-stuff/Pins', which is disallowed to 'nobody', the
typical user of web-based PHP scripts.

Chuck


At 10:08 AM -0700 10/25/01, Jeff Gannaway wrote:
?
$GalleryPHPName = Pins;
mkdir (../$GalleryPHPName, 0775);
?

Results in...

MkDir failed (Permission denied)

Any thoughts?

-Jeff Gannaway
___

Save 15% on 2002 Calendars and Holiday Cards!

http://www.AvantGifts.com
Discount Code: hopper22ct
Offer Good Through October 31, 2001
___

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Chuck Theobald, Technology Manager
ERIC Clearinghouse on Educational Management
5207 University of Oregon, Eugene, OR, 97403-5207
800-438-8841
* 541-346-1662 (voice) * 541-346-2334  (fax) * 541-337-0182 (cell) *
* http://eric.uoregon.edu/ * mailto:[EMAIL PROTECTED] *



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Jeff Gannaway

How do I set permissions for a certain user (ie nobody) for a directory?
If I do this, won't anyone on teh server be able to write to that directory?

Thanks,
Jeff

At 10:39 AM 10/25/01 -0700, Kurt Lieber wrote:
On Thursday 25 October 2001 10:08, you wrote:
 ?
 $GalleryPHPName = Pins;
 mkdir (../$GalleryPHPName, 0775);
 ?

 Results in...

 MkDir failed (Permission denied)

When you use a file-related command (fopen, mkdir, etc.) you're executing 
that command under the same user-context that apache runs under. (usually 
nobody on shared servers)  So, you need to make sure that user nobody
has 
write permissions on the parent directory where you're trying to create your 
directory.

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
___

Save 15% on 2002 Calendars and Holiday Cards!

http://www.AvantGifts.com
Discount Code: hopper22ct
Offer Good Through October 31, 2001
___ 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MKDIR Permission Denied

2001-10-25 Thread Kurt Lieber

On Thursday 25 October 2001 11:41, you wrote:
 How do I set permissions for a certain user (ie nobody) for a directory?
 If I do this, won't anyone on teh server be able to write to that
 directory?

If you're going to start messing around with *nix permissions, you really, 
really need to have a basic understanding of how they work.  Otherwise, you 
can get into a lot of trouble really quickly.  There's a ton of tutorials 
around the net; here's one that I've found helpful in the past:

http://www.linuxdoc.org/HOWTO/Security-HOWTO-5.html
(it's part of a larger linux security HOWTO)

As for your second question, yes.  That's one of the side-effects of using a 
shared server.

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]