Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

68 users online



Permission denied, rmdir

Permission denied, rmdir

Currently viewing this thread: 1 (0 members and 1 guests)


Page 2 out of 3
Dexxaboy

Dexxaboy

Neverside Newbie
Status: Offline!

My script.

PHP:

<?php
// Create the dir
mkdir("../downloads/scripts/".$_POST['sdir'], 0777);
// Move the script to the dir
move_uploaded_file($_FILES['thescript']['tmp_name'], "../downloads/scripts/".$_POST['sdir']."/".$_FILES['thescript']["name"]);
for(
$q2=1$q2 <= $preview_form_limit$q2++){
  
// Move the previews
  
move_uploaded_file($_FILES['preview'.$q2]['tmp_name'], "../downloads/scripts/".$_POST['sdir']."/".$_FILES['preview'.$q2]["name"]);
}
?>

PHP:

<?php
// Remove the dir
if(delete_dir("../downloads/scripts/".$script['dir']."/")){
  
rmdir("../downloads/scripts/".$script['dir']."/"); //Here is my error
}
?>

in this case $script['dir'] is alxx
*delete_dir() is a function that removes all the files in the dir

___________________

| Lunar Poll | Dexxaboys Site |

evan

evan

Neverside Newbie
Status: Offline!
Quote:

Originally posted by Dexxaboy
Opps, i select wrong dir. :-x

"Scripts is the main dir, and alxx is the subdir"

The dir is empty.

Like the other image, i cant uncheck writeprotect.


You're not an administrator on the machine then

Quote:

Originally posted by Nem
Do this.

PHP:

<?php

chmod
("dirname"0666);

?>

Run that before any of your script.


You can't chmod on Windows.

angelessme

angelessme

Neversidian
Status: Offline!

You can akdov, it just doesn't do anything Tongue

___________________

angelessme, antagonising neverside members, staff and administration since 2001.

Dexxaboy

Dexxaboy

Neverside Newbie
Status: Offline!
Quote:

Originally posted by akdovYou're not an administrator on the machine then.


Yes, i im the administrator.

___________________

| Lunar Poll | Dexxaboys Site |

Dexxaboy

Dexxaboy

Neverside Newbie
Status: Offline!

No one knows my problem?

___________________

| Lunar Poll | Dexxaboys Site |

chemical

chemical

Neverside Newbie
Status: Offline!

is the directory inside the apache main dir?

v3x0rg

v3x0rg

Pawn Coder
Status: Offline!

If you get the FTP program "Filezilla" it will go through and empty everything for you. It's pretty handy, and free Grin.

___________________

- Moderator at the official AMX Mod X forums

Dexxaboy

Dexxaboy

Neverside Newbie
Status: Offline!
Quote:

Originally posted by chemical
is the directory inside the apache main dir?


I've changed the DocumentRoot inside httpd.conf

___________________

| Lunar Poll | Dexxaboys Site |

evan

evan

Neverside Newbie
Status: Offline!

I don't know what's wrong, because the only reasons the directory can't be removed is
A. There are files in it. If it looks like there are no files, check for hidden files.
B. If it is in fact empty, it's read-only. You need to be an administrator to remove read-only rights, or get an administrator to add you to full control for the parent folder.

Dexxaboy

Dexxaboy

Neverside Newbie
Status: Offline!
Quote:

Originally posted by akdov
If it is in fact empty, it's read-only. You need to be an administrator to remove read-only rights, or get an administrator to add you to full control for the parent folder.


I am the administrator, but i do i change the read-only?

___________________

| Lunar Poll | Dexxaboys Site |

Page 2 out of 3
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0097 seconds.