0

When I try to use this command: $ mkdir /tmp/wordpress/wp-content/upgrade

It comes up with a message:

mkdir: cannot create directory '/tmp/wordpress/wp-content/upgrade': No such file or directory

Actually before I typed chmod 660 /tmp/wordpress/ .htaccess

Then I typed $ cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php

Then comes up with cp: failed to access '/tmp/wordpress/wp-config.php': Permisson denied

Please someone help me resolve this issue.

1 Answers1

2
mkdir -p /tmp/wordpress/wp-content/upgrade

will create all the missing sub directories.

Reason for your error: either /tmp/ or /tmp/wordpress/ does not exist. Also make sure when creating directories outside your /home/ that you own them as that user; otherwise you will also need sudo in front of the commands.

Personal note: I would use a location in /home/$USER/ for updates for wordpress.

Rinzwind
  • 310,127
  • I get it now but how do I resolve this. – Linuxbeginner Jul 27 '18 at 10:32
  • With the -p parameter I added in my example. You are missing that one in yours. – Rinzwind Jul 27 '18 at 10:34
  • It really works but what about the $ cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php – Linuxbeginner Jul 27 '18 at 10:36
  • That depends on what you did before the cp. Where did that file come from? Cuz you made a directory but that will not create a file. – Rinzwind Jul 27 '18 at 10:48
  • Actually before I typed chmod 660 /tmp/wordpress/ .htaccess

    Then I typed $ cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php

    Then comes up with cp: failed to access '/tmp/wordpress/wp-config.php': Permisson denied

    – Linuxbeginner Jul 27 '18 at 13:12