0

I made a Website which i want to publish right now. I asked someone if he could host it and later i got an e-Mail telling me it is all set up. Including a Admin Name and Password and also a MySQL root Password also telling me that LAMP is already installed. I read some tutorials and most of them tell me i have to upload my files to the "var/www" direction but i have no idea how to manage it. I tried Filezilla but after i log on to the server and try to upload my files it tells me "permission denied".

So right now i have a built website located on my hard drive which i can upload to my "home/NAME" folder but not to the "var" folder. Please I really could use some help!

0

open terminal then write sudo gedit /etc/apache2/sites-available/000-default.conf

Find DocumentRoot /var/www/html line

Change /html to /your desired folder name save it

Then run sudo a2dissite 000-default.conf; sudo a2ensite 000-defaut.conf; sudo service apache2 restart

Your hosting provider have to do the above procedure. Hope apache2 default page go away.

0

The remote system almost certainly has file permissions on /var/www set so that you cannot modify files in there. In fact, the default is that only root can modify files in there.

Assuming you don't have root (or sudo) access on that machine, the best course of action would be to request that the directory you will be using (eg /var/www/whatever) is changed to be owned by your user, so you can upload files there.

Alternatively, you could:

  • Ask for the server to be set up to host your site in your home directory (eg /home/yourname/www) instead of /var/www.

  • Ask to be added to a group (not a group the system uses like www-data but a newly created group) that is given write access in there via group permissions.

What you shouldn't do:

  • Set /var/www to be world-writable. This is a fairly big security risk.

  • Get added to the www-data user group and set that group to be owner of /var/www. This is a huge security risk as the www-data group is supposed to be unprivileged (eg, not have write access).

  • Thank you for your answer! So I have to contact him and ask him if he could add me to owning group? And why do i need the MySQL root Password? Edit: I don't know if it helds in any way but this is what is shown right now: 137.193.61.122 – Jan Lenzen Dec 8 '14 at 1:22
  • The MySQL root password gives you the ability to add and administer MySQL databases. If you have specific questions about that feel free to ask as a new question. – thomasrutter Dec 8 '14 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.