Skip to content
FREE & OPEN SOURCE Million Dollar Script is a free WordPress plugin for sponsor walls, campaign grids, fundraiser boards, and premium add-on workflows.

Legacy support, updated

Fix PHP touch(): Utime failed: Permission denied

The PHP process cannot update the file timestamp or create the requested file. Fix ownership and the smallest required directory or file permission for the web runtime; do not make the whole application world-writable.

Applies to
PHP file operations, WordPress, and legacy Million Dollar Script 2 image processing
Reviewed
First published

Identify the exact failing path

  1. Read the complete warning and record the file path. A relative path can resolve differently under a web request than under command-line PHP.
  2. Confirm whether the file already exists and which user and group own the file and each parent directory.
  3. Identify the user running PHP-FPM or the web server. Testing as your SSH account can succeed while the web request still fails.

Linux path inspection

ls -ld /path/to/parent /path/to/file
namei -l /path/to/file

Apply the narrowest safe correction

  • Prefer correct owner or group membership for the application’s intended writable directory.
  • Grant write access only where the application creates or updates files. WordPress core and plugin code should not be broadly writable by the web process.
  • Account for SELinux, container mounts, read-only filesystems, network-storage rules, and hosting-provider controls when Unix mode bits look correct.
  • Ask the hosting provider to make the change when you do not control the runtime user or filesystem policy.

Verify the result

Retry the same operation through the website, confirm that the expected file was created or updated, and review the PHP error log for related imagejpeg(), copy(), or path failures. Remove any temporary diagnostic file when the check is complete.