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