Reputation: 399
Is it normal that all files and folders, which is made by root, is write-protected? For instance, take a look at terminal log below:
shine@Shine-Ubuntu:~$ sudo -s
root@Shine-Ubuntu:~# echo >> 1.txt
root@Shine-Ubuntu:~# exit
exit
shine@Shine-Ubuntu:~$ rm 1.txt
rm: remove write-protected regular file '1.txt'?
(As you might know, echo >> FILE_NAME
creates a file and names it FILE_NAME
.)
When a file is made by root, and i want to delete it via user, it says remove write-protected regular file 'FILE_NAME'?
What should i do so the files and folders made by root won't be write-protected?
Upvotes: 0
Views: 3513
Reputation: 259
UMASK is the default permissions given when a new file or folder is created on a Linux machine. Detailed documentation/usage of umask can be seen here. Check umask setting on your system
Upvotes: 1