LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu directory permissions (http://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-directory-permissions-916121/)

Meneither 11-28-2011 11:23 PM

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.

Telengard 11-28-2011 11:35 PM

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

Specific question?

Meneither 11-29-2011 10:46 AM

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.

Telengard 11-29-2011 01:03 PM

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.

Meneither 11-29-2011 01:11 PM

Thank you so much for the clarification and the additional information.
Really appreciated.

Telengard 11-29-2011 01:34 PM

Glad to help :)


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