Delete Directory Problem (Permissions)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ragnew
Forum Newbie
Posts: 5
Joined: Mon Aug 23, 2004 2:40 pm

Delete Directory Problem (Permissions)

Post by ragnew »

Question:

This is driving me nuts.

I have a java applet script that uploads files and keeps the directory structure intact.

It puts the directory permissions to 755. No write permission for the group or public.

I read my files but then wish to delete them. I cannot delete them because of permission problems with the directory (which I also want to delete).

It won't let me chmod the directory (using a php script) so I can delete.

I can chmod using ftp but this doesn't help me.

What is the solution?

This is an admin fuction that I am doing. It keeps talking about permissions. Can I somehow put in some username and/or password somewhere in the script so it knows that I have permission?

Thanks in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

make the script/applet run as their owner and they should be deletable.
ragnew
Forum Newbie
Posts: 5
Joined: Mon Aug 23, 2004 2:40 pm

Post by ragnew »

I not sure how to do that. The script is a browser ftp script that ftps files and can create directories. It then redirects you to another page. thats where I put my code to process the files, then try to delete them.

How would I make the script the owner? Please advise. Assume I am stupid.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

hmm.. you could direct your script (php) to connect via ftp and do the delete operations..
ragnew
Forum Newbie
Posts: 5
Joined: Mon Aug 23, 2004 2:40 pm

Post by ragnew »

Okay, Thats not a bad idea. I will try and see if I can get it to work.
Post Reply