LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File permissions in linux (https://www.linuxquestions.org/questions/linux-newbie-8/file-permissions-in-linux-4175436941/)

thiyagusham 11-13-2012 09:06 AM

File permissions in linux
 
Hello to all;

Someone argues with me ...

Default umask 0002 for regular users (002)
Default umask root user is 0022 (022)
I know default umask value is 022.


>> 0022(022) vs 0002(002) >>

but i got ,
  • oracle user value also 022 ,
  • root user also 022

PHP Code:

oracle@localhost ~]$ whoami
oracle
[oracle@localhost ~]$ umask
0022
[root@localhost ~]# umask
0022 

>> My Questions >>

1. may i know the difference between 022 and 002.
( i know 777 - 022 = 755 666 - 002 = 644 )

2. is there any specific umask setting to ROOT and Normal user?

Regards
Thiyagusham.G

thiyagusham 11-13-2012 09:27 AM

hi to all ;

The following command also not working

>> Change execute permission only on the directories (files not affected) >>

PHP Code:

oracle@localhost ~]$ chmod a+Xfast
chmod
invalid mode string: `a+X*' 


Lennie 11-13-2012 10:39 AM

umask 022 gives 755 for folders and 644 for files
umask 002 gives 775/664 (folders/files)
That's the default permission you get when you create new files/folders.

022 is the normal umask, both for root and user. If you have a group with the same name as your user, and no one else is a member of that group, you can have 002. But that would in effect be the same as umask 022. If you want that people in the same group can write to your home you should have 002. But usually you don't want that...


All times are GMT -5. The time now is 10:05 PM.