I do su root
and then nano -w /home/myusername/configfile
... will this cause any problems ? Will it change the ownership of configfile
?
Asked
Active
Viewed 38 times
1 Answers
1
If the file does not exist yet then the new file will be owned by root
.
If the file already exists, then it is just opened and the only attributes that change are atime and (if written to) mtime.

Hauke Laging
- 90,279
chown -R myusername: /home/myusername
– Hauke Laging Jun 29 '20 at 19:46sudo chown -R myusername:myusername /home/myusername/*
– l3gi0n Jun 29 '20 at 20:42chown
must be run by root. Your command is fine. Just seems to make little sense to exclude the home directory. – Hauke Laging Jun 29 '20 at 20:46