/var/www/text.php: permission denid for ubuntu os

Asked by senthilkumar

/var/www/ folder is not create one file, the permission denied display the message. why not create a file.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Because you are using the OS as user which is default, If you want write access to files outside of $HOME you must use sudo and gksudo (or kdesu in KDE).

So to get write access you would need to run:

gksudo gedit /var/www/text.php

or in command line:

sudo nano /var/www/text.php

You will then get write access to the file.

Revision history for this message
nexes128 (nexes128) said :
#2

It would be best to add your self to the www-data group and modify the www dir permissions.
Code:
usermod -a -G www-data yourUserName
chmod -R g+rwx /var/www

Can you help with this problem?

Provide an answer of your own, or ask senthilkumar for more information if necessary.

To post a message you must log in.