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 testfolder3So 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.
No comments yet.
AWS Android Ansible Apache Apple Atlassian Automation BSD Backup Bash Bluecoat CMS Chef Cloud Consul Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder