LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-21-2010, 08:18 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
what means a dot after the file permission ?


Hi guys !

What means a dot after a file permission in a long listing (ls -l ) ?
The FS is a ext3, mounted without acl support.

Code:
root@quadbit:~# ls -la /media/sdf5
total 28
drwxr-xr-x   4 root   root    4096 2009-06-13 17:31 .
drwxr-xr-x  15 root   root    4096 2010-03-21 21:12 ..
drwx------   2 root   root   16384 2009-06-13 17:27 lost+found
drwxr-xr-x.  3 miguel miguel  4096 2009-06-17 19:26 miguel
root@quadbit:~# mount | grep /media/sdf5
/dev/mapper/truecrypt1 on /media/sdf5 type ext3 (rw)
root@quadbit:~#
[]

Last edited by marozsas; 03-22-2010 at 07:31 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-21-2010, 08:46 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
Read this - may help:
http://books.huihoo.org/slackware-li...-filesystem-ea
 
2 members found this post helpful.
Old 03-22-2010, 01:10 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,356

Rep: Reputation: 135Reputation: 135
. means the current directory in which you are .
.. means one directory up from the current directory

You can check by
Quote:
ls .
-> show the content of current directory

Quote:
cd ..
-> it will go to the previous directory or one dir up .
 
0 members found this post helpful.
Old 03-22-2010, 01:48 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
Quote:
Originally Posted by divyashree View Post
. means the current directory in which you are .
.. means one directory up from the current directory

You can check by
-> show the content of current directory

-> it will go to the previous directory or one dir up .
That's all correct but has nothing to do with his question ...

Code:
drwxr-xr-x.  3 miguel miguel  4096 2009-06-17 19:26 miguel
          ^he's talking about that dot.


Cheers,
Tink
 
Old 03-22-2010, 01:53 AM   #5
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
Quote:
Originally Posted by divyashree View Post
. means the current directory in which you are .
.. means one directory up from the current directory

You can check by
-> show the content of current directory

-> it will go to the previous directory or one dir up .
Nope i thing he is asking about folowing line not . and .. of first two line.


drwxr-xr-x. 3 miguel miguel 4096 2009-06-17 19:26 miguel
 
Old 03-22-2010, 02:36 AM   #6
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 36
I have never seen a dot after the file permissions..thats an info for me too..
 
Old 03-22-2010, 03:29 AM   #7
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,356

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by divyashree View Post
. means the current directory in which you are .
.. means one directory up from the current directory

You can check by
-> show the content of current directory

-> it will go to the previous directory or one dir up .
I am sorry for my misunderstandings ,but there is no such . in file permission bit .
 
Old 03-22-2010, 04:25 AM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,467
Blog Entries: 11

Rep: Reputation: 184Reputation: 184
Just to get this thread whole on its own.
I read the link Tinkster provided but this did not really answer the question about the dot. I could assume that the dot is an indicator that this file has extended attributes.. Right?

Just like a + shows files that have ACL's on them
Code:
someone@somewhere:~$ ls /var/www -lh
total 72K
-rw-rwxr--+  1 root     root      330 2009-08-04 15:09 base64.php
-rw-rw-r--+  1 www-data www-data   93 2010-01-04 16:25 blot.php
Code:
someone@somewhere:~$ getfacl /var/www/base64.php
getfacl: Removing leading '/' from absolute path names
# file: var/www/base64.php
# owner: root
# group: root
user::rw-
user:someone:rwx
group::r--
mask::rwx
other::r--
 
Old 03-22-2010, 07:43 AM   #9
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Original Poster
Rep: Reputation: 64
@ Tinkster: Thank you ! You're right. It is indeed, extended attributes.
@ divyashree: NO, I am talking about the dot AFTER the regular file permission field. Thanks for the answer anyway.
@ saagar: yes, I never see such dot. I already have seen a '+' (ACL), but not a '.' And as Tinkster has pointed it is a extended attribute. In this case I can get its value by "getfattr --dump". Cool !
@ zhjim: thanks for the summary. Yes, it is similar to ACL notation. You can get all extended attributes by "getfattr --dump"

thanks for all !

PS: I would like to add that extended attribute was not set by my-self, but by one of several exotic file manager I am trying with.

Last edited by marozsas; 03-22-2010 at 08:04 AM.
 
Old 04-05-2012, 10:20 AM   #10
ikisham
LQ Newbie
 
Registered: May 2011
Posts: 13

Rep: Reputation: 0
I'm not sure about this.
Code:
grub.d]# ls -l
total 64
-rwxr-xr-x. 1 root root 7528 Mar 15 11:40 00_header
-rwxr-xr-x. 1 root root 8872 Mar 15 11:40 10_linux
-rwxr-xr-x. 1 root root 9552 Mar 15 11:40 20_linux_xen
-rwxr-xr-x. 1 root root 9339 Mar 15 11:40 30_os-prober
-rwxr-xr-x  1 root root  691 Apr  5 10:55 39_puppy
-rwxr-xr-x. 1 root root  301 Mar 28 16:49 40_custom
-rwxr-xr-x. 1 root root   95 Mar 15 11:40 41_custom
-rwxr-xr-x. 1 root root 1259 Mar 15 11:40 90_persistent
-rw-r--r--. 1 root root  483 Mar 15 11:40 README
Note that 39_puppy has no dot. It was created by me (I don't remember now if with the file-manager or from console). But
Code:
grub.d]# lsattr *
-------------e- 00_header
-------------e- 10_linux
-------------e- 20_linux_xen
-------------e- 30_os-prober
-------------e- 39_puppy
-------------e- 40_custom
-------------e- 41_custom
-------------e- 90_persistent
-------------e- README
For lsattr the attributes are the same.

Now, answering my own doubt what may have happened is that I had selinux enabled (default in Fedora) and then I disabled it. So files that have been indexed by selinux may have had the dot and the ones created afterwards don't have them. Just a guess.
 
Old 07-26-2012, 06:19 AM   #11
vmpanzer
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by ikisham View Post
Now, answering my own doubt what may have happened is that I had selinux enabled (default in Fedora) and then I disabled it. So files that have been indexed by selinux may have had the dot and the ones created afterwards don't have them. Just a guess.
Well, your guess is good. The dot after file permissions in 'ls' long output denotes that the file in question has a SELinux security context, no matter if SELinux is enabled or not:
Code:
[root@backup /]# sestatus
SELinux status:                 disabled
[root@backup /]# ls -ald /lib
dr-xr-xr-x. 8 root root 4096 Feb 14 16:45 /lib
[root@backup /]# ls -Zd /lib
dr-xr-xr-x. root root system_u:object_r:lib_t:s0       /lib
[root@backup /]# 
[root@backup /]# ls -ald /srv
drwxr-xr-x 9 root root 4096 May  8 15:37 /srv
[root@backup /]# ls -Zd /srv
drwxr-xr-x root root ?                                /srv
[root@backup /]#
 
1 members found this post helpful.
  


Reply

Tags
file, permission


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
how to hide a file using file permissions in linux without using dot davender84 Linux - General 4 03-26-2009 01:13 AM
How to get file extension (without the dot) scls19fr Linux - General 11 08-21-2008 12:48 PM
[C] writing floating point to file- coma instead of dot slomek Programming 4 04-12-2007 04:23 PM
useradd not accepting dot so i am not able to use dot in mail id hanu_raob Linux - General 5 05-13-2004 08:04 AM
Error in my log file. Don't know what it means subzero80 Linux - Software 2 03-10-2003 08:24 AM


All times are GMT -5. The time now is 07:51 AM.

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