• Resolved Robert Chalmers

    (@shanghaitimes)


    I’m actually using version 4, however, the problem is this. When I try to upload media to a post

    There are lots of topics like this, but all appear to be referring to older versions, that look nothing like this version….

    The error is:

    Unable to create directory wp-content/uploads/2014/05. Is its parent directory writable by the server?

    any ideas?
    thanks

Viewing 15 replies - 1 through 15 (of 22 total)
  • Try changing the permissions on the wp-content directory to 766. If you still have problems, try 767, 775 or 777. Once your uploads are working, change the permissions on wp-content back to 755 again and check that everything still works OK.
    https://codex.www.ads-software.com/Changing_File_Permissions

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    Tried all that. No success.
    Thanks

    Ask your hosts to check whether you have a folder ownership issue.

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    I am the host… who should own the folders that wordpress uses?

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    I’m running Apache on Mac, Mysql etc.
    Everything installed fine, and updates work. So do Posts. Only, when I try to upload media… bang. This error message. Also, the folder ‘uploads’ wasn’t created by the install in the first place either. ?
    hmmmm

    WordPress. ??

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    WordPress? There is no user called WordPress?

    There should be on the server.

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    hmmm. Are you sure. I don’t see any instruction anywhere that says I should add a user to the entire system called wordpress.
    The error is telling me it’s a permission problem, not an ownership problem? and in any case, I’ve never had to set up a special user for wordpress in previous installs.

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    OK. Solved it. Actually asmi you pointed me in the right direction. Thanks.

    I’m running Apache, which has a user name of _www, findable on the mac with the command in the terminal of.
    `robert$ dscl . list /users

    Now, it has to be www that is doing the file upload and storage etc, so I changed the ownership on the directory uploads to _www:staff

    drwxr-xr-x 3 _www staff 102 21 May 16:46 uploads
    and the directories under that were created by Apache (_www) as needed.
    drwxrwxrwx 3 _www staff 102 21 May 16:46 2014

    Mind you, I had already created the directory by hand, uploads. Perhaps I may have needed to also change ownership of wp-content to _www:staff, but I’m not sure. I’m not going to fiddle any more. hey.. if it ain’t broke, don’t fix it… ??
    If that had been so, it may have created all required directories quietly…

    And lastly, thank you so much for responding so quickly. I appreciate your time and help a lot.

    No problem. Just glad to hear that you managed to get this sorted. ??

    I am experiencing the same issue.

    I have checked the ownership and permissions(755)

    I have also tried to set permissions to 777 with no luck.

    Any Ideas?

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    Have you already created the directory uploads, inside the directory wp-contents
    On my system, everything in wordpress is owned by me. ‘robert’ except as noted, in wp-content. Like this.

    drwxr-xr-x 23 robert staff 782 21 May 15:18 wordpress
    drwxr-xr-x 7 robert staff 238 21 May 15:42 wp-content
    drwxr-xr-x 3 _www staff 102 21 May 16:46 uploads

    drwxrwxrwx 3 _www staff 102 21 May 16:46 2014

    On my system, I had to manually create the directory uploads, then set it’s ownership like this. (Using Terminal)

    cd wp-content
    mkdir uploads
    sudo chown _www:staff uploads

    The _www user is the ownership of Apache2 running on my server. You will have to find out who the owner is of your webserver. If you have webserver logs available, then check who is the owner of them. If you are on a hosted service, you will need to ask the support people – because it’s actually the web service (Apache) that uploads and writes the contents of that directory.

    This is an existing website that we developed over 3 years ago. Just recently updated the plugins and WP to current versions.

    So, wp-content/upload/ already existed.
    I did manually create ../2014/05 structure and tried setting the permission to both 755 and 777 with no luck.

    I am off to test a couple of other older sites to see if the same challenge exist. I report my findings within a couple of hours.

    Smiles ~ Mike

    Thread Starter Robert Chalmers

    (@shanghaitimes)

    I’m pretty sure it’s ownership related, because I did as you did, created the directories, and set permissions to 777, 755 whatever, but no luck.
    It wasn’t till I deleted all that, then created the directory, uploads, and changed it’s ownership:group to the same as the web server – in my case apache , with ownership and group of _www:staff, that it started to work. I didn’t need to create 2014/5 by hand, the system did that. I just created uploads, which may have been there anyway…
    The key was ownership. So maybe with uploads set to the same ownership as the web server, it will work .

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Incorrect permissions on upload directory’ is closed to new replies.