Header RSS Feed
 
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup BSD Database Hacks Hardware Internet Linux Mail MySQL Monitoring Network Personal PHP Proxy Shell Solaris Unix Virtualization VMware Windows Wyse

How to delete files created by Apache user?
Saturday - Jan 16th 2010 - by - (0 comments)
There is one problem on shared hosting servers with Apache and PHP running on it: If a PHP script creates files and folders the owner of those created files is the user under which Apache is running, that's mostly www-data or wwwrun. User's accessing their webaccount by ftp and wanting to delete such files receive a permission denied error - because (of course) they're not allowed to delete those files. Here an example of an ls -l output:

-rw-r--r-- 1 www-data www-data 0 2010-01-16 18:30 file1 -rw-r--r-- 1 www-data www-data 0 2010-01-16 18:30 file2 -rw-r--r-- 1 www-data www-data 0 2010-01-16 18:30 file3 drwxr-xr-x 2 www-data www-data 4.0K 2010-01-16 18:30 testfolder1 drwxr-xr-x 2 www-data www-data 4.0K 2010-01-16 18:30 testfolder2 drwxr-xr-x 2 www-data www-data 4.0K 2010-01-16 18:30 testfolder3

So if you're someone who was seeking for a solution when you can't delete the files with your ftp user, this is it! Find more information in IT Howto's / PHP Script: Delete files and folders created by Apache user.

 

Add a comment

Show form to leave a comment

Comments (newest first):

No comments yet.

Go to Homepage home
Linux Howtos how to's
Monitoring Plugins monitoring plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

7576 Days
until Death of Computers
Why?