I’ve uploaded some files into a directory i’ve created (using a php upload script). At first I didn’t set the right chmod for dir. and files (411 instead of 777). Now this folder and files are stuck on the server, can’t delete using FTP, cant delete using script: unlink/rmdir. I don’t have server acces. Is there any way to still do this using PHP scripting?
chmod ("/somedir/somefile", 755); // php script code
does not work you still can try
unlink($filename); // php script code
rmdir($dirname); // php script code
to remove them. If this does not work then your apache-account on the server does not have the necessary rights to do that. I guess this should usually work cause your apache-account created those files.
- How to give PHP permissions to write to files without globally opening up permissions to the directory
- PHP Image upload folder
- Linux FTP upload: “No such file or directory”, but file exists
- How can I prevent people from looking at a listing of files in parent directory if I haven’t uploaded index.html?
- PHP Session File Stored in Temp Directory – Apache