WordPress.org

Support

Support » How-To and Troubleshooting » Permission denied error when writing to cache

Permission denied error when writing to cache

  • fotherington

    @fotherington

    Hi, I get the following error:

    Warning: imagejpeg() [function.imagejpeg]: Unable to open ‘/usr/local/psa/home/vhosts/claywell.me.uk/httpdocs/tom/blog/wp-content/plugins/last.fm/cache/TmFuY3klMkJLZXJyJTJCJTI1MjYlMkJKYW1lcyUyQkZhZ2FuI18jQmV0d2VlbitUaGUrTGlnaHQrQW5kK0Rhcms=.jpg’ for writing: Permission denied in /usr/local/psa/home/vhosts/claywell.me.uk/httpdocs/tom/blog/wp-content/plugins/last.fm/last.fm.php on line 498

    when using the Last.fm Records plugin on my webpage (claywe.me.uk/tom/blog). I can’t get the theme I’m running to work with widgets, so I put <?php lastfmrecords_display(‘3month’, 4); ?> into index.php in my theme’s directory.

    How can I correct this error? I checked, and the cache directory does exist.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    @otto42

    Change the permissions on that directory (ONLY that cache directory) to allow writing of files. Try these permissions values: 600, 660, 666. Use the lowest number that actually lets the plugin work.

    http://codex.wordpress.org/Changing_File_Permissions

    fotherington

    @fotherington

    I’m afraid it required 0777 applied to the directory and the cache file within before the plugin worked.

    Moderator Samuel Wood (Otto)

    @otto42

    Why in the world would it need executable access? Are you sure it won’t work with 666? Try it again.

    Leaving a directory 777 is very, very bad. Avoid that.

    fotherington

    @fotherington

    Okay, directory and everything else now 666 – and I’m getting a different error:

    Fatal error: Call to undefined function lastfmrecords_display() in /usr/local/psa/home/vhosts/claywell.me.uk/httpdocs/tom/blog/wp-content/themes/connections/connections/index.php on line 67

    and FileZilla won’t show the contents of the cache directory or let its permissions be changed further. This is what I get:

    Status:	Retrieving directory listing...
    Command:	CWD /httpdocs/tom/blog/wp-content/plugins/last.fm/cache/
    Response:	550 /httpdocs/tom/blog/wp-content/plugins/last.fm/cache/: Permission denied
    Error:	Failed to retrieve directory listing
    Status:	Set permissions of '/httpdocs/tom/blog/wp-content/plugins/last.fm/cache' to '666'
    Command:	CWD /httpdocs/tom/blog/wp-content/plugins/last.fm/
    Response:	550 /httpdocs/tom/blog/wp-content/plugins/last.fm/: Permission denied
    fotherington

    @fotherington

    And now trying to look at the last.fm plugin directory itself gives me a ‘failed to retrieve directory listing’ error. I think I’m going to have to ask tech support to delete the folder themselves, since I can’t do it using an FTP client, and give up on the idea of using this plugin. Which is a pity, since when it worked it looked better than the last.fm official plugin.

    trebor31

    @trebor31

    Hi
    May be totally unrelated, but I did experience similar problems to those you are having.
    I found out that this was caused when I uploaded the plugin – my server didnt like the period “.” in the “last.fm” folder and on upload changed it to “lastfm” – this gave me fatal errors, permission denied to cache folder, lines of code on my blog where the album covers should appear etc, etc.

    Via ftp, I was able to manually change the folder name back to “last.fm” and everything works fine now.

    fotherington

    @fotherington

    I’m afraid it does seem to be unrelated – the folder “last.fm” was created fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Permission denied error when writing to cache’ is closed to new replies.
Skip to toolbar