0

I have installed wordpress on localhost with apache server on fedora . when I want to upload files to it I get this error:

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

My wordpress directories and files are owned by user and group: apache:apache and have permission 755. my wp-content has 777 permission but I does not work. what is the problem?

5
  • What's the permission of directory wp-content/uploads/?
    – masegaloeh
    Jul 8, 2014 at 9:04
  • Its permission is 777
    – s_puria
    Jul 8, 2014 at 9:14
  • 1
    Side note: having the Wordpress directories and files owned by the web server is a huge security risk. One standard way to hack PHP sites is to use some vulnerability to inject code into the files. This is often done to use the website as a node in a botnet/spamnet, making it respond to requests.
    – Halfgaar
    Jul 8, 2014 at 9:14
  • all files have permission, but it does not work!
    – s_puria
    Jul 8, 2014 at 13:25
  • 1
    Are you using SELinux? Check /var/log/messages and /var/log/audit.log for deny messages. Jul 29, 2014 at 6:37

3 Answers 3

1

Just check the value upload_path in wp_options. It solved my problem right away.

0

Did you move your install or is it a new one? I have the same when moving a Wordpress site to other hosting. In my experience it had two causes: 1#. The file rights weren't correct (but you tried 777, which is highly unadvisable!)

2. The file owner is different from the owner you installed the site with. I changed the standard root owner to the user I created and which I'm working.

Option #2 might sound weird due to 777 have to give access to anyone, but it has worked for me..

0

Also check the uploading size limit in php.ini, you can even increase the limit and try again.

Yes it could also be because of the wrong folder path where you are uploading.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .