1
bocks
No permission to delete files in 'uploads' folder..
  • 2005/6/13 17:43

  • bocks

  • Friend of XOOPS

  • Posts: 41

  • Since: 2002/9/6 6


I have tried to search this all over XOOPS forum, but couldn't find a solution.

I have an old website build using XOOPS in a subdomain, and now I am about to delete the subdomain [including all the files]. When I tried to delete the 'uploads' folder, it says "550 Can't remove directory: Directory not empty".

I tried navigate into the 'uploads' folder, and found a 'newbb' folder. Inside the 'newbb' folder, there is a 'thumbs' folder. When I tried to delete the 'thumbs' folder, it says "550 Can't remove directory: Permission denied".

Then I noticed that the owner of both 'newbb' folder and it's 'thumbs' subfolder is 99, and not me, and the permission of both folders are 755.

Now, how do I delete those folders? I know I could just ask my hosting support to delete it for me, but if things like this happens again, it would be messy to ask my hosting support to delete it everytime. Besides, there must be some way that I can delete the folders myself [maybe using a php script?].

Hope someone can help me with this.

2
Mithrandir
Re: No permission to delete files in uploads folder..

The owner is probably the webserver user (the user, the webserver is running as)

this small script could perhaps work for you:
<?php

unlink
("full/path/to/uploads/newbb/thumbs");
unlink("full/path/to/uploads/newbb");
?>

Otherwise you will most likely have to call on your host's support.

3
bocks
Re: No permission to delete files in uploads folder..
  • 2005/6/13 17:56

  • bocks

  • Friend of XOOPS

  • Posts: 41

  • Since: 2002/9/6 6


Thanks Mith,

I just tried the small script you gave me. But it doesn't work. It gave me a warning:

Warningunlink(/***/uploads/newbb/thumbs): Is a directory in /***/del_uploads.php on line 2

Warning
unlink(/***/uploads/newbb): Is a directory in /***/del_uploads.php on line 3


I guess I have to call my host's support for this.

p/s: I was wondering, when a module create a file/folder inside the 'uploads' folder, who is the owner of the file/folder that the module created?

4
Mithrandir
Re: No permission to delete files in uploads folder..

Ah bugger

unlink() is for files.

rmdir() is for directories. Try that instead

5
wcrwcr
Re: No permission to delete files in uploads folder..
  • 2005/6/13 18:02

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi

Did you give a try to CHMOD 777 those folders and after that try to remove them?

Hope this helps

6
bocks
Re: No permission to delete files in uploads folder..
  • 2005/6/13 18:11

  • bocks

  • Friend of XOOPS

  • Posts: 41

  • Since: 2002/9/6 6


Quote:
Mithrandir wrote:
Ah bugger

unlink() is for files.

rmdir() is for directories. Try that instead


That works fine. Thanks Mith.

Btw wcrwcr, I did try to chmod 777 but it says permission denied, since the owner of the folder is not me.

Anyway, thanks everyone!!

Login

Who's Online

229 user(s) are online (172 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits