Hi,
i try to delete a folder with aceftp and i get the following error:
550: Directory not empty
Unable to remove folder "/httpdocs/artists/boe", continuing anyway...
I even tried it with cuteftp pro, but the same thing.
How can i fix that, or why is it?
Greetz,
tom
delete folder with ftp problem
Moderator: General Moderators
- potato
- Forum Contributor
- Posts: 192
- Joined: Tue Mar 16, 2004 8:30 am
- Location: my lovely trailer, next to the big tree
No, its a folder created automatic by the server when a user signs in.
Some of the folders are rwxr-xr-x :: those folders i can open & delete.
But some of them are rwx----- :: those folders i can't.
It's something with the restrictions i think.
And why are they not maked all rwxr-xr-x like it should be?
Some of the folders are rwxr-xr-x :: those folders i can open & delete.
But some of them are rwx----- :: those folders i can't.
It's something with the restrictions i think.
And why are they not maked all rwxr-xr-x like it should be?
I'm guessing that the ones with one set of rwx have possibly been created by a user on the server that you or the user running apache are no part of in a group. Therefore it will not let you delete them as there are no permissions set for a group or world, just for that user.
Like I said it's a 'guess' but that would eb where I would start. If you can get rid of the other folders with more permissions then that implies to me that you are at least part of the same group as the suer that created those folders or they have world execute rights.. which I think they do have as the last 'x' is showing. e.g. rwxr-xr-x. breaking it down I think it can be read like this:
rwx - the user who created the folder cna do what they want
r-x - any user part of the same group as the group associated with the folder can read and execute the folder
r-x - any user can read and execute the folder, does not have to be in the same group that owns the folder
might help..... :\
Like I said it's a 'guess' but that would eb where I would start. If you can get rid of the other folders with more permissions then that implies to me that you are at least part of the same group as the suer that created those folders or they have world execute rights.. which I think they do have as the last 'x' is showing. e.g. rwxr-xr-x. breaking it down I think it can be read like this:
rwx - the user who created the folder cna do what they want
r-x - any user part of the same group as the group associated with the folder can read and execute the folder
r-x - any user can read and execute the folder, does not have to be in the same group that owns the folder
might help..... :\
So you could try to let the server delete the directory.
Code: Select all
<?php
function deldir($dir) {
$handle = opendir($dir);
while (false!==($FolderOrFile = readdir($handle))) {
if($FolderOrFile != "." && $FolderOrFile != "..") {
if(is_dir("$dir/$FolderOrFile")) {
deldir("$dir/$FolderOrFile");
} else {
unlink("$dir/$FolderOrFile");
}
}
}
closedir($handle);
if(rmdir($dir)) {
$success = true;
}
return $success;
}
?>