While saving file in server folder keeps asking root access

Asked

Viewed 120 times

0

I searched about my problem and only found solutions for host ( none presented applicable to the local server ), does anyone know how I disable this stop ask for the root password every time I save a change in the file with extension .php ? ( tried chmod in the folder but it didn’t work )

Nginx 1.4.6

Php 5.5.9

Ubuntu 14.04.1 ( Backbox )

1 answer

2


It’s not about Nginx, actually editing the file on the machine is not about servers.

The problem of asking "password" is that the folder that this php scripts are do not belong to your linux user, this is a problem of your understanding about linux.

Linux is not like Windows, you need to first understand what groups, user and permissions are, but I won’t go into detail

The quick solution is to change the folder where the files are changing in the nginx.conf, look for something like this root /var/www (or similar) and adjust to a folder where you have access from the user for example, in the folder /home/usuario create a folder named /home/usuario/www and edit the root, will look something like this:

server {
    listen       80;
    server_name  localhost;

    root   /home/usuario/www;

Restart Nginx after saving changes from nginx.conf

Now start writing your scripts inside /home/usuario/www

  • Vlw, I just moved in a little while ago ... I’m focusing on programming for now.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.