sudo without password to write to file that need root right

It is necessary that sometimes you need to write the data  to the root files with "sudo" and "password". But if you need to set auto-run scripts, then it is a problem to enter the password. Here is the way how you do it in Linux system.

Change the owner of the file defaultly with root right to the username and group who you are used to write the data:
sudo chown -R username:group /path/to/root/directory
That is all,  pretty simple. Then you can set a cronjob to write and modify the directory now. 

Comments

Popular posts from this blog

install ipython in Cloudera VM using pip

install postgreSQL in ubuntu 16.04

Install MYSQL 5.6 in ubuntu 12.04/14.04 and set password and remote access