LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-28-2011, 11:23 PM   #1
Meneither
LQ Newbie
 
Registered: Nov 2011
Posts: 12

Rep: Reputation: Disabled
Question Ubuntu directory permissions


I am newbie in linux / Ubuntu and I would like to understand a little better the directories and file permissions, and I would like to know how to understand the following data:

total 40
drwxr-xr-x 2 root root 4096 2008-10-19 15:17 www
drwxrwxrwt 2 root root 4096 2008-06-13 10:14 tmp
drwxr-xr-x 4 root root 4096 2008-10-19 15:17 spool
drwxr-xr-x 11 root root 400 2008-10-21 09:22 run
drwxr-xr-x 2 root root 4096 2008-10-19 15:10 opt
drwxrwsr-x 2 root mail 4096 2008-10-20 13:53 mail
drwxr-xr-x 10 root root 4096 2008-10-21 09:22 log
drwxrwxrwt 3 root root 60 2008-10-21 09:22 lock
drwxrwsr-x 2 root staff 4096 2008-06-13 10:14 local
drwxr-xr-x 27 root root 4096 2008-10-19 15:19 lib
drwxr-xr-x 9 root root 4096 2008-10-19 15:17 cache
drwxr-xr-x 2 root root 4096 2008-10-19 15:10 backups

perhaps someone can explain how to read this data.

Thanks in advance.
 
Old 11-28-2011, 11:35 PM   #2
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
https://help.ubuntu.com/community/FilePermissions
http://en.wikipedia.org/wiki/Filesys...ix_permissions

Specific question?
 
Old 11-29-2011, 10:46 AM   #3
Meneither
LQ Newbie
 
Registered: Nov 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thank you for your response I took a pick on the links you pasted. now my specific question is:
what do the following data after the permissions characters means?
For instance there is a 2 number right after the permissions caracters, then the word root, root, 4096,2008-10-19,15:17,www for the very first row.

At the top it says "Total 40", however there is only 12 rows.

I ran the same command on my computer and it showed "Total 2000+" and I saw like 30 rows only.

I have a problem on my computer in accessing shared folders and I am trying to understand the users and files' permissions.

Thank you again in advance.
 
Old 11-29-2011, 01:03 PM   #4
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
Quote:
drwxr-xr-x 2 root root 4096 2008-10-19 15:17 www
  • d = directory
  • rwxr-xr-x = permissions for the directory
  • 2 = number of directories inside this directory, in this case ".' and ".."
  • root = owner of the directory
  • root = group of the directory
  • 4096 = size of the file in bytes, don't really understand how this is calculated for directories
  • 2008-10-19 15:17 = mtime of the file, don't really understand how this is applied to directories
  • www = name of the directory

The total line is supposed to represent disk allocation for all files in the directory.

Please understand that the output of ls can be implementation specific. Different Linux distros do things in different ways. Other Unix descendants can be even more different.

Additions and clarifications on the above are heartily welcomed

Oh, and related thread.
 
Old 11-29-2011, 01:11 PM   #5
Meneither
LQ Newbie
 
Registered: Nov 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thank you so much for the clarification and the additional information.
Really appreciated.
 
Old 11-29-2011, 01:34 PM   #6
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
Glad to help
 
  


Reply

Tags
file, file permission, permissions



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
change directory permissions in ubuntu rflores2323 Linux - Newbie 4 11-02-2011 11:11 AM
File permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
permissions over one directory only 0perat0r Linux - Newbie 3 12-07-2007 05:23 PM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 12:52 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:49 PM.

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
Open Source Consulting | Domain Registration