Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

The solution I use is to run the command as the user that has the permissions you want to keep:

sudo -u user command 

This keeps the permissions from changing. I use it when updating git repositories on my VPS, while keeping the file permissions set to the webserver user.

See also the same question herehere.

The solution I use is to run the command as the user that has the permissions you want to keep:

sudo -u user command 

This keeps the permissions from changing. I use it when updating git repositories on my VPS, while keeping the file permissions set to the webserver user.

See also the same question here.

The solution I use is to run the command as the user that has the permissions you want to keep:

sudo -u user command 

This keeps the permissions from changing. I use it when updating git repositories on my VPS, while keeping the file permissions set to the webserver user.

See also the same question here.

replaced http://askubuntu.com/ with https://askubuntu.com/
Source Link

The solution I use is to run the command as the userrun the command as the user that has the permissions you want to keep:

sudo -u user command 

This keeps the permissions from changing. I use it when updating git repositories on my VPS, while keeping the file permissions set to the webserver user.

See also the same question here.

The solution I use is to run the command as the user that has the permissions you want to keep:

sudo -u user command 

This keeps the permissions from changing. I use it when updating git repositories on my VPS, while keeping the file permissions set to the webserver user.

See also the same question here.

The solution I use is to run the command as the user that has the permissions you want to keep:

sudo -u user command 

This keeps the permissions from changing. I use it when updating git repositories on my VPS, while keeping the file permissions set to the webserver user.

See also the same question here.

Source Link
CoderGuy123
  • 210
  • 3
  • 12

The solution I use is to run the command as the user that has the permissions you want to keep:

sudo -u user command 

This keeps the permissions from changing. I use it when updating git repositories on my VPS, while keeping the file permissions set to the webserver user.

See also the same question here.