SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress - How to decide what permission levels to grant for files

    This is something a little confusing to me.

    I'm unable to upload pics to posts on a wordpress blog.

    I get the error:

    Unable to create directory /home/httpd/vhosts/arenabadminton.com.my/httpdocs/wp-content/uploads/2009/01. Is its parent directory writable by the server?

    I know how to do it (i'm using filezilla and i know you can change file permissions there). But what type of permission to grant is what i don't know.

    Now if i wanted to be able to upload pics to posts, how much (what permisson modes) and to which folders or files do i have to set permissions to.

    This is the setup on my webserver:

    /httpdocs/wp-content

    How much permission do i give wp-content?

    I know that the pics are stored in this directory:

    /httpdocs/wp-content/uploads

    Do i give the same (same as wp-content) permisson attributes to uploads?

    The problem with Wordpress Codex is it tells you what Example Permission Modes are there and what they are (values), but they don't teach on which file or directory to change (permission settings) if you want a certain feature enabled like in my case to be able to upload pics to posts.

    Thank you everybody!
    Jaysone

  2. #2
    Word Painter silver trophy Shyflower's Avatar
    Join Date
    Oct 2003
    Location
    Winona, MN USA
    Posts
    10,053
    Mentioned
    142 Post(s)
    Tagged
    2 Thread(s)
    The permissions on my uploads directories are rwe re re or 755. As long as the first number is 7 (rwe), as administrator you should be able to write to the directory.
    Linda Jenkinson
    "Say what you mean. Mean what you say. But don't say it mean." ~Unknown

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shyflower View Post
    The permissions on my uploads directories are rwe re re or 755. As long as the first number is 7 (rwe), as administrator you should be able to write to the directory.
    /httpdocs/wp-content

    Is /wp-content set to 755?

    or

    /wp-content and all files and subdirectories within it is set to 755?

    or

    /httpdocs/wp-content/uploads

    /uploads set to 755

    or

    /uploads and all files and subdirectories within
    it is set to 755

    Really appreciate the help.

    Thank you,
    Jaysone

  4. #4
    Word Painter silver trophy Shyflower's Avatar
    Join Date
    Oct 2003
    Location
    Winona, MN USA
    Posts
    10,053
    Mentioned
    142 Post(s)
    Tagged
    2 Thread(s)
    If your permissions are all set properly, try deactivating your plugins and see if you can write to the directory then. Then activate the plug-ins one by one and see if you can write to the directory as you re-activate each one.

    It probably sounds silly, but a lot of problems in WP are caused by plugins that don't play well with some unrelated feature.
    Linda Jenkinson
    "Say what you mean. Mean what you say. But don't say it mean." ~Unknown

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shyflower View Post
    If your permissions are all set properly, try deactivating your plugins and see if you can write to the directory then. Then activate the plug-ins one by one and see if you can write to the directory as you re-activate each one.

    It probably sounds silly, but a lot of problems in WP are caused by plugins that don't play well with some unrelated feature.
    I have no plugins activated.

    my wp-content directory folder is set to 755 on the server

    inside my wp-content directory, there is a index.php file. That file is set to 644. I don't know that that file is there? Do i need to change that to 755?

    The themes folder inside wp-content is also 755.

    The theme's folder inside my theme folder is also 755.

    My uploads folder inside wp-content is also 755.

    Inside the uploads folder there is another folder called 2009 that is set to 755

    The 2009 contains a folder called 01 and that too is 755

    All the pictures (image files) in the 01 folder is also 755.

    Now when i try to upload a picture into a post from my computer, i get this error:

    The uploaded file could not be moved to /home/httpd/vhosts/arenabadminton.com.my/httpdocs/wp-content/uploads/2009/01.

    I experimented and chose the option to insert a post from media library, Wordpress displayed some pics in a list but no thumbnail images. I just wanted to see if atleast the images from media library could be inserted and i hit the "insert into post" buttom, and it takes me back to the post editor page and i see this line of code below:

    <img src="http://localhost/arenabadminton/wp-c...8/12/about.jpg" alt="about" title="about" width="420" height="215" class="aligncenter size-full wp-image-142" />

    Notice it points to localhost. This problem is really draining me.

    I tried to probe deeper to find a solution, so i went to the dashboard and then went into the Miscellaneous section under the Settings to see where it stores my uploads.

    So,

    on the "Store uploads in this folder" field, the value is wp-content/uploads

    "Full URL path to files" field is left blank. There's a note at the side of this field saying "Configuring this is optional by default it should be blank"


    Thank you all for the support,
    Jaysone

  6. #6
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I Solved it YAY!

    Let me share my joy!

    /httpdocs/wp-content and all it's content / subdirectories and files are set to 755

    except

    the uploads folder which is a 777.

    Only after changing the uploads folder and all it's subdirectories and files to 777 did i manage to solve this annoying problem.

    Thank you all again for helping me.
    Last edited by kennethjaysone; Feb 24, 2009 at 21:39. Reason: typo error
    Jaysone

  7. #7
    Word Painter silver trophy Shyflower's Avatar
    Join Date
    Oct 2003
    Location
    Winona, MN USA
    Posts
    10,053
    Mentioned
    142 Post(s)
    Tagged
    2 Thread(s)
    I'm glad you figured it out! Congrats! Wish I could have been more help!
    Linda Jenkinson
    "Say what you mean. Mean what you say. But don't say it mean." ~Unknown

  8. #8
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shyflower View Post
    I'm glad you figured it out! Congrats! Wish I could have been more help!
    Of course you helped!

    What i've learnt in this community is far more than what any of my college lecturers have thought. I thank god for people like you in the community.

    Anyway...Just wanted to let you know that this website www.arenabadminton.com.my is a hybrid fluid-elastic wannabe but i couldn't achieve it or perfect it and i guess the that approach was not practical becuase there is alot of imagery used and everything is breaking out of its place.

    I'm gonna change the layout to a fixed width but still allow the text to scale, but that will create low line lenght...

    okay.. okay..i'm going off topic now..this is CSS...but do diagnose the site and i'd love to know how i can improve the Usability and quality of the way the website was built.

    The content is not done by me so i'm only responsible to make an accessible, usable website..

    and also decent looking..

    I think i didn't do so well so i'll have to make it better.

    Thank you again.
    Last edited by kennethjaysone; Feb 24, 2009 at 22:43. Reason: typo error
    Jaysone

  9. #9
    Word Painter silver trophy Shyflower's Avatar
    Join Date
    Oct 2003
    Location
    Winona, MN USA
    Posts
    10,053
    Mentioned
    142 Post(s)
    Tagged
    2 Thread(s)
    Can't help you with that one. Input on sites have to go in the review my site forum. You'll need to review three other members sites (follow the stickied guidelines) and then your thread will be eligible to get some help as well.
    Linda Jenkinson
    "Say what you mean. Mean what you say. But don't say it mean." ~Unknown

  10. #10
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shyflower View Post
    Can't help you with that one. Input on sites have to go in the review my site forum. You'll need to review three other members sites (follow the stickied guidelines) and then your thread will be eligible to get some help as well.
    ok, i didn't know that..thanks again..
    Jaysone


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •