Unable to create anything on /var/www/html/

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
SamLearnsLinux
Level 3
Level 3
Posts: 108
Joined: Wed Jun 27, 2018 6:13 am

Unable to create anything on /var/www/html/

Post by SamLearnsLinux » Fri Jun 29, 2018 8:14 am

Hi I'm trying to set up a LAMP stack and everything has worked till the step where I download the latest wordpress. When I enter

Code: Select all

unzip -q latest.zip -d /var/www/html/
I get a pageful of error saying

Code: Select all

checkdir error:  cannot create /var/www/html/wordpress
                 Permission denied
                 unable to process wordpress/.
checkdir error:  cannot create /var/www/html/wordpress
                 Permission denied
                 unable to process wordpress/xmlrpc.php.
...
I tried Googling this and it seems like a write permission issue for /var/www/html and there are various different ways to give permission to write on disk and I'm unsure which one I should use because there are also a lot of comments saying permissions should be changed a certain way.

I would be thankful if someone could show me the correct way to address this issue.

gm10
Level 17
Level 17
Posts: 7454
Joined: Thu Jun 21, 2018 5:11 pm

Re: Unable to create anything on /var/www/html/

Post by gm10 » Fri Jun 29, 2018 8:49 am

There is no single answer to that.

The standard way to access system files is to prefix commands that do it with sudo, so this will work:

Code: Select all

sudo unzip -q latest.zip -d /var/www/html/
The rest depends on your specific use case. The above may already be all you need so I'll leave it at that for now. If you need to edit any configuration files on disk, lainch the editor with sudo as well.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

SamLearnsLinux
Level 3
Level 3
Posts: 108
Joined: Wed Jun 27, 2018 6:13 am

Re: Unable to create anything on /var/www/html/

Post by SamLearnsLinux » Fri Jun 29, 2018 9:13 am

Thank you so much. That worked! I just successfully installed Wordpress :D

timbow
Level 1
Level 1
Posts: 43
Joined: Wed Oct 11, 2017 6:06 pm

Re: Unable to create anything on /var/www/html/

Post by timbow » Mon Jul 02, 2018 4:59 am

And what followed?
Does this mean you can only use the terminal to install wordpress?
No chown, no chmod, no symlinks ?
Did it actually work? how do you edit files? how do you add plugins?

You can use wordpress on any one of several million actual apache web servers on linux worldwide. I don't understand why nobody seems to know how to set up a local development server to the same configuration.

Post Reply

Return to “Newbie Questions”