Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 89742  / 2 Years ago, sat, april 23, 2022, 4:05:11

Very, very new user to Ubuntu and I've been searching for a long time without finding an answer. Probably I've gotten the answer but I don't understand it all that very well so I thought I try this instead.
My problem is that I don't have a permission to the var/www folder that I assume is where my "localhost" should be. I don't know how to change the permission so I can change files and add. Nether am I sure if I want to. MY intentions are only to be available to view PHP in my browser. If anyone know how I can change my permissions or how I can view PHP else way I'll be very happy.



Running Ubuntu 12.04.



Thanks!



P.S. As I said I'm very new so please take it slow :)


More From » permissions

 Answers
7

First of all, had you install a server as lampp? Is you did, the files sould be at some place as /opt/lampp/htdocs.



Assuming that the htdocs directory is on /var/www, you could change the permissions like this (in a Terminal, open it by searching Terminal on the Dash):



sudo chmod -R 777 /var/www
sudo chown -R **yourusername** /var/www


You must change yourusername with the username you entered in the installing process.



I hope it works to you!


[#35532] Saturday, April 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aveerakfas

Total Points: 106
Total Questions: 148
Total Answers: 129

Location: Monaco
Member since Sun, Jan 1, 2023
1 Year ago
;