LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-13-2012, 10:06 AM   #1
thiyagusham
Member
 
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
[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
 
Old 11-13-2012, 10:27 AM   #2
thiyagusham
Member
 
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
chmod
invalid mode string: `a+X*' 
 
Old 11-13-2012, 11:39 AM   #3
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 329

Rep: Reputation: 62
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.
  


Reply


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 10:18 AM
how to hide a file using file permissions in linux without using dot davender84 Linux - General 4 03-26-2009 01:13 AM
Windows file permissions with a Linux file server joseph_k Linux - Server 3 05-09-2008 01:54 PM
Linux file permissions soccertux Linux - General 3 03-18-2005 02:51 PM
Linux File Permissions - Need some help. richcom23 Linux - Networking 6 02-24-2004 02:51 PM


All times are GMT -5. The time now is 06:32 AM.

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