Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-13-2012, 09:06 AM   #1
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
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@localhost ~]$ umask
[root@localhost ~]# umask
>> 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?

Old 11-13-2012, 09:27 AM   #2
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
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
invalid mode string: `a+X*' 
Old 11-13-2012, 10:39 AM   #3
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 337

Rep: Reputation: 72
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...
2 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux file permissions Binoy B Linux - Newbie 5 05-28-2009 09:18 AM
how to hide a file using file permissions in linux without using dot davender84 Linux - General 4 03-26-2009 12:13 AM
Windows file permissions with a Linux file server joseph_k Linux - Server 3 05-09-2008 12:54 PM
Linux file permissions soccertux Linux - General 3 03-18-2005 01:51 PM
Linux File Permissions - Need some help. richcom23 Linux - Networking 6 02-24-2004 01:51 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration