cland410 Posted June 26, 2009 Share Posted June 26, 2009 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. Link to comment https://forums.phpfreaks.com/topic/163777-mkdir-permission-denied-on-windows-mounted-drive-need-help/ Share on other sites More sharing options...
Tonic-_- Posted June 26, 2009 Share Posted June 26, 2009 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. Link to comment https://forums.phpfreaks.com/topic/163777-mkdir-permission-denied-on-windows-mounted-drive-need-help/#findComment-864151 Share on other sites More sharing options...
cland410 Posted June 26, 2009 Author Share Posted June 26, 2009 I don't think that will help because it's not a windows directory, its a mounted windows network folder on a linux server. Link to comment https://forums.phpfreaks.com/topic/163777-mkdir-permission-denied-on-windows-mounted-drive-need-help/#findComment-864160 Share on other sites More sharing options...
cland410 Posted June 27, 2009 Author Share Posted June 27, 2009 sorry guys, this seems to be a linux problem and not php. it seems my problem is getting a permission denied on trying to create a dir on the smbfs mount in general, even as root. Link to comment https://forums.phpfreaks.com/topic/163777-mkdir-permission-denied-on-windows-mounted-drive-need-help/#findComment-864692 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.