473,508 Members | 2,240 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 5405
..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.dewrote 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_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.dewrote 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_reporting 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.dewrote in message
news:ho********************************@4ax.com...
.oO(John)
>>"Michael Fesser" <ne*****@gmx.dewrote 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_reporting 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
1746
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...
8
6048
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...
2
2572
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,...
5
9242
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...
30
7650
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...
8
24495
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
1980
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...
3
1683
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 =...
2
4473
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...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7401
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...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
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...
0
5640
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,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4720
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...
0
1568
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 ...
1
773
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.