1756997 Members
2204 Online
108858 Solutions
New Discussion юеВ

Re: 644 mode? (y/n)

 
Shahril M
Frequent Advisor

644 mode? (y/n)

Hi,

$ ll 123*
-rw-r--r-- 1 oracle dba 0 Mar 10 05:22 123.123
$ umask
077
$ rm 123.123
123.123: 644 mode ? (y/n) y

Why does it shoot me with this question?
2 REPLIES 2
Michael Tully
Honored Contributor

Re: 644 mode? (y/n)

This usually will happen if you don't have the appropriate permissions to delete files regardless of your umask value. 'umask' is used for file creation.
Anyone for a Mutiny ?
Bill Hassell
Honored Contributor

Re: 644 mode? (y/n)

The ability to read, write or execute a file is controlled by the permissions of the file itself. The ability to remove (or move) a file has nothing to do with the file's permissions. Instead, the existence of a file completely depends on the directory permissions, including the sticky bit. So a file could be 777 permissions but if it resides in a directory with 755 permissions, you can't delete the file unless you have write privileges in the directory. If the directory is 1777, the sticky bit prevents non-owners from removing anything even though everyone has write permission.

umask only affects the creation permissions and does not affect the ability to remove a file or directory.


Bill Hassell, sysadmin