When saving file in the folder of the server is asking for root access [closed]

0

I researched my problem and found only host solutions (none of which applied to the local server), does anyone know how I disable this stop asking the root password every time I save a file change with extension. php ? (tried chmod in the folder but did not work)

Nginx 1.4.6

Php 5.5.9

Ubuntu 14.04.1 (Backbox)

    
asked by anonymous 21.11.2016 / 02:57

1 answer

2

It does not have to be with Nginx, actually editing the file on the machine does not have to be with servers.

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

Linux is not equal to Windows, you first need to understand what groups, user and permissions are, but I will not go into details

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

server {
    listen       80;
    server_name  localhost;

    root   /home/usuario/www;

Restart Nginx after saving changes from root

Now start writing your scripts within nginx.conf

    
21.11.2016 / 03:46