morleo
By:
morleo

Can't create any folder in /var/www/ with new user for Wordpress, but can edit files and names (Also all permissions got), Ubuntu 14.04

August 11, 2014 7.1k views

Hi,
I can't create any folder in /var/www/ directory, via my new Wordpress user

Here is permissions of that user.

-rw-rwxr-- 1 wp-user wp-user 418 Sep 24 2013 index.php
-rw-rwxr-- 1 wp-user wp-user 19930 Apr 9 19:50 license.txt
-rw-rwxr-- 1 wp-user wp-user 7194 Aug 6 14:27 readme.html
-rw-rwxr-- 1 wp-user wp-user 4896 Dec 24 2013 wp-activate.php
drwxrwxr-x 9 wp-user wp-user 4096 Aug 6 14:41 wp-admin
-rw-rwxr-- 1 wp-user wp-user 271 Jan 8 2012 wp-blog-header.php
-rw-rwxr-- 1 wp-user wp-user 4818 Feb 18 16:45 wp-comments-post.php
-rw-rwxr-- 1 wp-user wp-user 3591 Aug 11 15:32 wp-config.php
drwxrwxr-x 4 wp-user wp-user 4096 Aug 6 14:41 wp-content
-rw-rwxr-- 1 wp-user wp-user 2932 Sep 24 2013 wp-cron.php
drwxrwxr-x 12 wp-user wp-user 4096 Aug 6 14:41 wp-includes
-rw-rwxr-- 1 wp-user wp-user 2380 Oct 24 2013 wp-links-opml.php
-rw-rwxr-- 1 wp-user wp-user 2359 Oct 24 2013 wp-load.php
-rw-rwxr-- 1 wp-user wp-user 33407 Aug 6 02:37 wp-login.php
-rw-rwxr-- 1 wp-user wp-user 8235 Nov 13 2013 wp-mail.php
-rw-rwxr-- 1 wp-user wp-user 11070 Apr 7 16:15 wp-settings.php
-rw-rwxr-- 1 wp-user wp-user 25665 Nov 12 2013 wp-signup.php
-rw-rwxr-- 1 wp-user wp-user 4026 Oct 24 2013 wp-trackback.php
-rw-rwxr-- 1 wp-user wp-user 3032 Feb 9 2014 xmlrpc.php

What am I doing wrong?

Thanks!

2 Answers

What are the permissions on the folder itself, not the files in it?

ls -la /var/www/

It seems like your user probably owns all the files in the folder, but not the folder itself. To fix the ownership of the folder, run:

sudo chown -R wp-user:www-data  /var/www/
  • drwxrwsrwx  5 wp-user wp-user  4096 Aug 11 14:33 www
    

    Looks like that folder have all available permissions..

  • Ooh! You've solved all my problems! But why that permissions didn't work? Your command was perfect solution.
    Thank you so much!

  • I cant seem to view my /var directory - Can you point me in the right direction to solving this issue?

What am I doing wrong?

Installing wordpress not as it should be done.
http://codex.wordpress.org/Installing_WordPress

Have another answer? Share your knowledge.