<p>I have set 755 permissions to these folders and they are owned by the PHP web user. </p>

<p>However, I'm still getting logs that say:</p>

<pre><code>[error] [application] Could not delete the file /var/www/craft/storage/runtime/assets/sources/76.jpg because the file does not exist.



Tried to read the folder contents of /var/www/craft/storage/runtime/temp/, but could not.

Tried to read the folder contents of /var/www/craft/storage/runtime/cache/, but could not.
</code></pre>

<p>76.jpg does exist. And I don't know why it can't read those folders. Any ideas how to fix this??</p>

CC BY-SA 3.0
2016-05-06T16:59:21.593Z
What user:group is the web server running as and what user:group owns the files and folders?
Brad Bell
CC BY-SA 3.0
2016-05-06T17:07:11.940Z
My php runs with the www-data user. The files and groups are set to that user.
Sandy D.
CC BY-SA 3.0
2016-05-06T17:21:17.150Z
What happens if you load up Craft's `bootstrap.php` file in a script and do `IOHelper::deleteFile('/var/www/craft/storage/runtime/assets/sources/76.jpg');`
Brad Bell
CC BY-SA 3.0
2016-05-06T17:22:42.363Z
@BradBell I'm very new to Craft. I'm not sure what you are wanting me to do? Am I loading this in a template file or something?
Sandy D.
CC BY-SA 3.0
2016-05-06T17:31:40.730Z
Create a `test.php` and put it in your public HTML folder with these contents: https://gist.github.com/takobell/1a8c98d0ad69e2c99dc984b993bb7479 Then load up yourdomain.com/test.php in a browser and see what gets output to the screen.
Brad Bell
CC BY-SA 3.0
2016-05-06T17:36:49.587Z
It gives me a 500 error
Sandy D.
CC BY-SA 3.0
2016-05-06T17:38:52.200Z
You might need to adjust `$craft = require '../craft/app/bootstrap.php';` if your `craft` folder is not one level above web root.
Brad Bell
CC BY-SA 3.0
2016-05-06T17:40:50.153Z
My craft folder is 1 level above:
My craft/ and html/ directory are located in the www/ directory.
Sandy D.
CC BY-SA 3.0
2016-05-06T17:45:00.817Z
When I remove the 2 .. before the path. I get this output:
Warning: require(/craft/app/bootstrap.php): failed to open stream: No such file or directory in /var/www/html/test.php on line 12

Fatal error: require(): Failed opening required '/craft/app/bootstrap.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/test.php on line 12
Sandy D.
CC BY-SA 3.0
2016-05-06T19:34:49.570Z
Try the updated Gist: https://gist.github.com/takobell/1a8c98d0ad69e2c99dc984b993bb7479
Brad Bell
CC BY-SA 3.0
2016-05-06T19:39:17.027Z
It returned fail.
Sandy D.
CC BY-SA 3.0
2016-05-06T22:01:29.143Z
And did you get a new `Could not delete the file` message in your log files?
Brad Bell
CC BY-SA 3.0
2016-05-09T14:14:24.927Z
This morning I got "fail" twice. Then I logged into my craftcms and then re-ran the the script. It says "success" but in the log file it says: Could not delete the file /var/www/craft/storage/runtime/assets/sources/76.jpg because the file does not exist.
Sandy D.
CC BY-SA 3.0
2016-05-09T14:15:31.917Z
The file doesn't exist now... so I have no idea what was wrong... because we didn't change anything. Other than running that script.
Sandy D.
<cache><error-message><permissions>
Folder Permissions for Assets, Cache, and temp
# Folder Permissions for Assets, Cache, and temp

(Asked by: username_0 on 2016-05-06)

I have set 755 permissions to these folders and they are owned by the PHP web user. 
However, I'm still getting logs that say:
[error] [application] Could not delete the file /var/www/craft/storage/runtime/assets/sources/76.jpg because the file does not exist.



Tried to read the folder contents of /var/www/craft/storage/runtime/temp/, but could not.

Tried to read the folder contents of /var/www/craft/storage/runtime/cache/, but could not.

76.jpg does exist. And I don't know why it can't read those folders. Any ideas how to fix this??

**Tags:** cache, error-message, permissions
> **Comments:**
> **username_1**: What user:group is the web server running as and what user:group owns the files and folders?  
> **username_0**: My php runs with the www-data user. The files and groups are set to that user.  
> **username_1**: What happens if you load up Craft's `bootstrap.php` file in a script and do `IOHelper::deleteFile('/var/www/craft/storage/runtime/assets/sources/76.jpg');`  
> **username_0**: @BradBell I'm very new to Craft. I'm not sure what you are wanting me to do? Am I loading this in a template file or something?  
> **username_1**: Create a `test.php` and put it in your public HTML folder with these contents: https://gist.github.com/takobell/1a8c98d0ad69e2c99dc984b993bb7479 Then load up yourdomain.com/test.php in a browser and see what gets output to the screen.  
> **username_0**: It gives me a 500 error  
> **username_1**: You might need to adjust `$craft = require '../craft/app/bootstrap.php';` if your `craft` folder is not one level above web root.  
> **username_0**: My craft folder is 1 level above: My craft/ and html/ directory are located in the www/ directory.  
> **username_0**: When I remove the 2 .. before the path. I get this output: Warning: require(/craft/app/bootstrap.php): failed to open stream: No such file or directory in /var/www/html/test.php on line 12  Fatal error: require(): Failed opening required '/craft/app/bootstrap.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/test.php on line 12  
> **username_1**: Try the updated Gist: https://gist.github.com/takobell/1a8c98d0ad69e2c99dc984b993bb7479  
> **username_0**: It returned fail.  
> **username_1**: And did you get a new `Could not delete the file` message in your log files?  
> **username_0**: This morning I got "fail" twice. Then I logged into my craftcms and then re-ran the the script. It says "success" but in the log file it says: Could not delete the file /var/www/craft/storage/runtime/assets/sources/76.jpg because the file does not exist.  
> **username_0**: The file doesn't exist now... so I have no idea what was wrong... because we didn't change anything. Other than running that script.  

---

## 0 answers

