LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 08-03-2010, 04:00 PM   #1
moiseszaragoza
Member
 
Registered: Jul 2010
Posts: 37

Rep: Reputation: 15
drwxr-xr-x 2 File permission


i have 2 types of files. well i have the same file type with permission.
and i was wondering if any one could tell me how to properly read them

permission type 1 = "-rw-r--r-- 1"
permission type 2 = "drwxr-xr-x 2"

Thanks.
 
Old 08-03-2010, 04:01 PM   #2
moiseszaragoza
Member
 
Registered: Jul 2010
Posts: 37

Original Poster
Rep: Reputation: 15
i was reading http://www.redhat.com/docs/manuals/l...ownership.html
and it looks like that 1 and 2 are not part of the permission but i don't know what it stands for
 
Old 08-03-2010, 05:18 PM   #3
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by moiseszaragoza View Post
permission type 1 = "-rw-r--r-- 1"
"-" means the file is a regular file

"rw-" means the file's owner can read from and write to the file

"r--" means members of the file's group can read from the file

"r--" means other users can read from the file

"1" means the file has 1 hard link

Quote:
permission type 2 = "drwxr-xr-x 2"
"d" means the file is a directory

"rwx" means the directory's owner can list its contents, create new files within it, and descend into it

"r-x" means members of the directory's group can list its contents and descend into it

"r-x" means other users can list the directory's contents and descend into it

"2" means the directory has 2 hard links

That's the way I understand it. If any of the above is provably wrong then please do correct me.
 
Old 08-03-2010, 05:45 PM   #4
dcatiii
LQ Newbie
 
Registered: Apr 2010
Location: Dallas, TX
Distribution: Arch, Ubuntu, Redhat
Posts: 26

Rep: Reputation: 0
just to further elaborate on telengard's post for educational purposes...

another way to read it can be defined below;

r = 4
w = 2
x = 1

divide the permission in to 3 different groups (User, Group, Everyone Else)

So just to give a clear example, a common permission is 755
which means (User has complete control of the file, Groups can read and execute without modification, Everyone else can read and execute without modification.)
 
  


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
drwxr-xr-x+ question mokku Linux - Newbie 2 03-06-2009 10:38 AM
File Permissions: The "s" in drwxr-sr-x zok Linux - General 1 12-08-2006 09:21 AM
drwxr-xr-x but read-only? marychin Linux - General 6 04-03-2006 04:53 AM
drwxr-xr-x but read-only? marychin Linux - Newbie 4 03-31-2006 09:30 AM
[SOLVED] what does meen drwxr-xr-T permission? angel115 Linux - Newbie 2 10-14-2005 10:30 AM


All times are GMT -5. The time now is 09:08 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration