473,788 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mkdir not working

Hi

The following does not create a directory neither does it give any error
message. Any ideas?

$umask=umask(0) ;
$where="/var/www/vhosts/example.com/httpdocs/friday/";
mkdir ($where,0777);
umask($umask);

Regards
John

Jan 30 '08 #1
4 5423
..oO(John)
>The following does not create a directory neither does it give any error
message. Any ideas?

$umask=umask(0 );
$where="/var/www/vhosts/example.com/httpdocs/friday/";
mkdir ($where,0777);
umask($umask );
error_reporting set to E_ALL|E_STRICT? display_errors ON?

Micha
Jan 30 '08 #2

"Michael Fesser" <ne*****@gmx.de wrote in message
news:g3******** *************** *********@4ax.c om...
.oO(John)
>>The following does not create a directory neither does it give any error
message. Any ideas?

$umask=umask( 0);
$where="/var/www/vhosts/example.com/httpdocs/friday/";
mkdir ($where,0777);
umask($umask) ;

error_reporting set to E_ALL|E_STRICT? display_errors ON?

Micha
Thanks. Now got a message.

Warning: mkdir() [function.mkdir]: Permission denied in
/home/john/example.com/adhoc.php on line 25

[Line 25 is mkdir]

Regards
John

Jan 30 '08 #3
..oO(John)
>"Michael Fesser" <ne*****@gmx.de wrote in message
news:g3******* *************** **********@4ax. com...
>.oO(John)
>>>The following does not create a directory neither does it give any error
message. Any ideas?

$umask=umask (0);
$where="/var/www/vhosts/example.com/httpdocs/friday/";
mkdir ($where,0777);
umask($umask );

error_reportin g set to E_ALL|E_STRICT? display_errors ON?

Thanks. Now got a message.

Warning: mkdir() [function.mkdir]: Permission denied in
/home/john/example.com/adhoc.php on line 25

[Line 25 is mkdir]
Should be pretty clear now. The web server doesn't have write access in
the given directory.

Micha
Jan 30 '08 #4

"Michael Fesser" <ne*****@gmx.de wrote in message
news:ho******** *************** *********@4ax.c om...
.oO(John)
>>"Michael Fesser" <ne*****@gmx.de wrote in message
news:g3****** *************** ***********@4ax .com...
>>.oO(John)

The following does not create a directory neither does it give any error
message. Any ideas?

$umask=umas k(0);
$where="/var/www/vhosts/example.com/httpdocs/friday/";
mkdir ($where,0777);
umask($umas k);

error_reporti ng set to E_ALL|E_STRICT? display_errors ON?

Thanks. Now got a message.

Warning: mkdir() [function.mkdir]: Permission denied in
/home/john/example.com/adhoc.php on line 25

[Line 25 is mkdir]

Should be pretty clear now. The web server doesn't have write access in
the given directory.

Micha
Got it. The directory above the one being created needs write chmod.
Many thanks. Working now.
Regards
John
Jan 30 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1756
by: Shaun | last post by:
Hello! I can't seem to get paths and variables working together: import os a = 'books' os.chdir( '/test') os.mkdir("/test/"a) the last line does not seem to work. os.mkdir(a) makes the directory
8
6061
by: Sue | last post by:
AccessXP in Access2000 Mode: In my code I use the MkDir method to create a folder and then I want to use the transfertext method to create a delimited text file in that folder. MkDir runs and then when transfertext runs I get a message that a file can not be created in the folder because the folder is Read Only. When I check the folder's attributes with Windows Explorer, sure enough the folder is Read Only. How can I use the MkDir...
2
2585
by: Juby | last post by:
I'm creating a script for our website which will function as something of a docment manager. The backend features an option to create a new directory in the uploads subdirectory. The problem is, once I've used mkdir() to create this file, when I later run is_dir() on the filename, I get 'false'. Even worse, if I run is_file() on the new directories, I get false as well. The same thing seems to be happening to files I submit via the...
5
9276
by: eoindeb | last post by:
I am trying to create a directory on Solaris using the mkdir() function. This works fine when I pass a string literal ("/etc/hosts") to mkdir, but if I try passing a directory pointer to mkdir, it returns a -1 error. The directory error works fine with fopen - does anyone know what I am doing wrong?? Here's a snippet of the code: int Check_Directory() //check for existence of directory - if not there, create the file { int status, ret...
30
7712
by: MikeC | last post by:
Good People, I'm writing a backup utility that uses a chdir() to go into the source directory (in which the files reside that I want to back up), so I don't want to use chdir() to get into the target directory (where the backup copies will be kept, on another drive). I can successfully test whether the target directory exists or not using findfirst(), but if it doesn't, I wanted to create it using mkdir(), but it doesn't like the path...
8
24533
by: vj | last post by:
How do I do the following unix command: mkdir -m770 test with the os.mkdir command. Using os.mkdir(mode=0770) ends with the incorrect permissions. Thanks, VJ
2
1993
by: _q_u_a_m_i_s's | last post by:
Hy, i encountered a weird problem on a server running php5, and apache. Seems like i cannot create folders that end with "/". for example: mkdir("test/") will fail mkdir("test") will work Is there any issue with mkdir that i don`t know about? or safe_mode affects this in any way? The problem is that mkdir is called in lots of different places in the
3
1694
by: fouadk | last post by:
hi everyone.... i am trying to create a folder in my home directory but that ain't working due to permission restriction my code looks like the following: <?php $path = "/home/fouad/testing"; if(mkdir($path,700,TRUE)) {print "success."; }else {print "failure.";} ?>
2
4535
by: ezechiel | last post by:
Hi, I'm working on windows here.. i have a script that makes directories, subdirs (mkdir) and I afterwards set special permissions with xcacls trough a system call. But when I took a closer look at the advanced security permissions, I saw that mkdir makes permission inheritance, when creating the subdirectories: main dir is ok, but sub dir permissions: Inherited From: permissions inherited by
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.