I'm trying to delete a file on the server but the PHP is still busy on it and wont let me delete it... FTP says SORRY cant do:
> DELE ml.txt
< 550 ml.txt: Permission denied
> PORT 190,028,4,31,129,100
and
> SITE CHMOD 777 ml.txt
< 550 ml.txt: Operation not permitted
What to do, in order to kill the process or delete the file?
try, ssh => login as root, try renaming the file and then delete it.
Why not just stop the web server and restart?
If running php directly, simply use top to find the process and kill it.
Find the process id and then
or even simpler enough:
su -
chown -r change_with_your_username:change_with_your_usergroup change_with_full_path_to_the_file
if the steps above dont work then try this
rcs -u YourFileName
seeman rcs
if it is installed in your system. seeman sccs
to learn how to unlock with sccs. unfortunately i don't know.fuser -m TheFileName
or the directoryName holding itfuser
is file user. seeman fuser
to see how to kill the process using your file. i think it isfuser -km FileName
. better investigate it yourself. If you know which process is using your file you can terminate the process withkill
command.lsattr YourFileName
to see the attributes of your file. it might be set as immutable or undeletable with commandchattr -i filename
orchattr -u filename
if so you can do the opposite withchattr +i +u filename
seeman chattr
orman lsattr
for more detail.chattr
andlsattr
come with newer systems. my fedora2 has it. older systems don't