Directory and files stuck on server after upload
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?
If
chmod ("/somedir/somefile", 755); // php script code
does not work you still can try
unlink($filename); // php script code
and
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.
Check more discussion of this question.
Related posts:
- 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
Leave a comment
Recent Posts
Tags
active-directory
amazon-ec2
apache
apache2
backup
bash
centos
cisco
command-line
debian
dns
email
exchange
firewall
iis
iis7
iptables
linux
macosx
monitoring
mysql
networking
nginx
performance
permissions
php
postfix
raid
security
sql-server
sql-server-2005
sql-server-2008
ssh
ssl
ubuntu
unix
virtualization
vpn
webserver
windows
windows-7
windows-server-2003
windows-server-2008
windows-server-2008-r2
windows-xp





