Purging Trash Problem

I'm trying to purge the trash and i have several pdf files in there and it gives me the following error and won't empty the trash: -


WARNING: unlink(/data/private/assets/pdf_file/348/DINCERTCO_NP_NatureFlex.pdf): Permission denied

Reported 1st Mar 2005 9:19am

--------------------------------------------------------------------------------



WARNING: Unable to delete: /data/private/assets/pdf_file/348/DINCERTCO_NP_NatureFlex.pdf

Reported 1st Mar 2005 9:19am

--------------------------------------------------------------------------------



WARNING: Failed deleteing asset "DINCERTCO_NP_NatureFlex.pdf", could not delete restricted data directory

Reported 1st Mar 2005 9:19am

--------------------------------------------------------------------------------



WARNING: Purge aborted, unable to delete "DINCERTCO_NP_NatureFlex.pdf" [348]

Reported 1st Mar 2005 9:19am



Any idea's why it can't delete the file. I've tried it as the root user as well with the same out come.

I think the problem could be that the files it is struggling to delete were added to MySource using the import_files.php script.


How would i get around this??

Your going to have to make sure the web server has write access to MYSOURCE_ROOT/data. You'll need to chmod -R to make sure you get the lower directories Matrix is complaining about.


Makes sense that using the import script caused this - your user accounts obviously dont have the same groups.

I usually use [font=“Courier”]sudo -u apache php import_files.php[/font] so that the files that the script creates are owned by the apache user. As Greg says, you need to ensure that the files are writable by the web server user.