Unable to create directory error on xammp ubuntu 16.04

1

1

I have installed WordPress with Xampp. Now when i am trying to upload image in wordpress it shows the following errors. Unable to create directory wp-content/uploads/2016/08. Is its parent directory writable by the server? what should i do? Thank You

smehsan

Posted 2016-08-05T16:47:49.427

Reputation: 13

I assume you are using windows, I belive the directory wp-content/uploads needs the NTFS permissions changed. See this http://www.ntfs.com/ntfs-permissions-setting.htm

– mt025 – 2016-08-05T16:50:50.333

Ah okay. Then you will need to use chmod to change the permissions of the directory. – mt025 – 2016-08-05T16:54:30.850

can you please tell me how? and which directory? – smehsan – 2016-08-05T16:55:11.147

Do you have access to a terminal? or just FTP – mt025 – 2016-08-05T16:57:20.023

i am with terminal. – smehsan – 2016-08-05T16:58:24.040

Let us continue this discussion in chat.

– smehsan – 2016-08-05T17:01:28.323

Answers

1

You need to change the linux ownership of the directory. To do this, you need to know the owner of the httpd/apache process you can get this by typing ps aux | grep apache or ps aux | grep httpd. Normally the owner is nobody or deamon.

Then cd into your wp-content directory. e.g. cd /opt/lampp/htdocs/wordpress/wp-content and create the uploads directory mkdir uploads.

You will then need to set this directorys owner to the user that is running apache. e.g. sudo chown deamon uploads

Try your upload again and it should be working.

mt025

Posted 2016-08-05T16:47:49.427

Reputation: 2 392

0

Try the settings > Media option in wordpress and set the correct media uploads path. Sometimes while changing servers and restoring wordpress from backups the problem occurs. I see that you have fixed the issue. But for other looking for a solutions here is a good 2 step guide. http://rooturaj.com/technology/unable-to-create-directory-wordpress/

Rooturaj Pattanaik

Posted 2016-08-05T16:47:49.427

Reputation: 1