Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T16:59:21.593Z
Comments.Text: What user:group is the web server running as and what user:group owns the files and folders?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:07:11.940Z
Comments.Text: My php runs with the www-data user. The files and groups are set to that user.
Comments.UserDisplayName: Sandy D.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:21:17.150Z
Comments.Text: 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');`
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:22:42.363Z
Comments.Text: @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?
Comments.UserDisplayName: Sandy D.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:31:40.730Z
Comments.Text: 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.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:36:49.587Z
Comments.Text: It gives me a 500 error
Comments.UserDisplayName: Sandy D.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:38:52.200Z
Comments.Text: You might need to adjust `$craft = require '../craft/app/bootstrap.php';` if your `craft` folder is not one level above web root.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:40:50.153Z
Comments.Text: My craft folder is 1 level above:
  My craft/ and html/ directory are located in the www/ directory.
Comments.UserDisplayName: Sandy D.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T17:45:00.817Z
Comments.Text: 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
Comments.UserDisplayName: Sandy D.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T19:34:49.570Z
Comments.Text: Try the updated Gist: https://gist.github.com/takobell/1a8c98d0ad69e2c99dc984b993bb7479
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T19:39:17.027Z
Comments.Text: It returned fail.
Comments.UserDisplayName: Sandy D.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-06T22:01:29.143Z
Comments.Text: And did you get a new `Could not delete the file` message in your log files?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-09T14:14:24.927Z
Comments.Text: 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.
Comments.UserDisplayName: Sandy D.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-09T14:15:31.917Z
Comments.Text: 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.
Comments.UserDisplayName: Sandy D.
Tags: <cache><error-message><permissions>
Title: Folder Permissions for Assets, Cache, and temp
ThreadText: # 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**: @username_1 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
  
  