Jump to content

mkdir() permission denied on windows mounted drive - need help


cland410

Recommended Posts

Hey guys. This is my first post on phpfreaks and hope to come back much more to learn from everyone here. I've done a lot of googling on looking for a solution to this problem but haven't come across an answer yet. I am trying to figure out why it won't let me a create a new dir using mkdir() on a mounted windows network drive (using samba). The error I get is "Warning: mkdir() [function.mkdir]: Permission denied in". When I mounted the drive I did mount -t smbfs -o uid=www-data, gid=www-data so that it would allow php to have full permissions to have access to the dir. The permissions are 777 on the dir and I still get the error. If anyone has any input I would really appreciate it. Thanks.

Try reading this?

http://www.php.net/function.mkdir

 

When creating directories in Windows, trailing periods (".") are ignored.  for example:

<?php

mkdir('c:/Buck Jr.',0755);    // on Windows creates "c:/Buck Jr"
mkdir('c:/Elipses...',0755);  // on Windows creates "c:/Elipses"
mkdir('c:/php.com',0755);     // on Windows creates "c:/php.com"

?>

This is a Window's quirk, not a php shortcoming--meaning that you get the same results from a Window's command prompt.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.