Can't delete files or folders using filemanager or ftp access

bcp1961

Member
Apr 15, 2003
5
0
151
Naples, Floride
I've tried setting the folders and files to '777' but still get this error:
Permission denied mv: cannot unlink `pages/11.html':

Does anyone know what that means and how to correct it. I can't even delete through my ftp access, I get a 550 error "Permission denied"...?
 
Last edited:

NNNils

Well-Known Member
Sep 17, 2002
580
0
166
Is there also a solution for this users can do themselves (without shell access)?

cPanel.net Support Ticket Number:
 

bcp1961

Member
Apr 15, 2003
5
0
151
Naples, Floride
This is the script that I am using to unlink my files and folders. It seems to work very well, you can just put a folder name in if you want to delete all the files in it, but then you have to ftp in or go through the control panel and delete them manually after running the script below. If you are just deleting certain files then this will automatically delete them for you. For some reason when you execute the script it gives you a "Warning: operation not permitted....." error message - but it still works. I haven't figured that one out yet!
Hope this helps.

PHP:
<?php
chmod("folder/file.html", 0777); // let the system put it open

chown("folder/file.html", 0730); //scripts UID becomes owner

unlink("folder/file.html"); //delete the file
?>
cPanel.net Support Ticket Number:
 

B12Org

Well-Known Member
Jul 15, 2003
692
1
168
Seattle Washington
cPanel Access Level
Root Administrator
Hey thanks! The "chattr -i" command worked for me. I was banging my head on the wall trying to get this one file to delete, and now I can finally rest! Thanks again!