WordPress.org

Ready to get started?Download WordPress

Forums

Permission denied error when writing to cache (8 posts)

  1. fotherington
    Member
    Posted 6 years ago #

    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.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    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

  3. fotherington
    Member
    Posted 6 years ago #

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

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    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.

  5. fotherington
    Member
    Posted 6 years ago #

    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
  6. fotherington
    Member
    Posted 6 years ago #

    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.

  7. trebor31
    Member
    Posted 6 years ago #

    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.

  8. fotherington
    Member
    Posted 6 years ago #

    I'm afraid it does seem to be unrelated - the folder "last.fm" was created fine.

Topic Closed

This topic has been closed to new replies.

About this Topic