cancel
Showing results for 
Search instead for 
Did you mean: 

[PAYH] Getting rid of files / folders

glyndev
Grafter
Posts: 620
Registered: ‎31-07-2007

[PAYH] Getting rid of files / folders

Does anyone know of or have a script that can be used to get rid of OLD unused files and folders owned by 'www-data'. or will at least change the ownership of them so that they can be deleted manually.
3 REPLIES 3
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: [PAYH] Getting rid of files / folders

If you just want to delete them, you can use your FTP client.
Edit: If you have www-data owned files actually inside www-data owned folders, you could use something like webadmin.php (available from various places on the net) to change the folder permissions to 777. (The script opens a door to your whole file system, so you may want to remove it after use.)
Gabe
glyndev
Grafter
Posts: 620
Registered: ‎31-07-2007

Re: [PAYH] Getting rid of files / folders

Thanks. Got rid of a lot but this method doesnt work on sub folders and files within sub folders.
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: [PAYH] Getting rid of files / folders

Aha. Try using webadmin to upload another (renamed) copy of itself. That will get the script owned by www-data. It won't be able to see the folder it's in, but if you point it at a www-data owned folder it will be able to delete or chmod anything owned by www-data.
Gabe