LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what means a dot after the file permission ? (http://www.linuxquestions.org/questions/linux-newbie-8/what-means-a-dot-after-the-file-permission-796947/)

marozsas 03-21-2010 07:18 PM

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:~#

[:scratch:]

Tinkster 03-21-2010 07:46 PM

Read this - may help:
http://books.huihoo.org/slackware-li...-filesystem-ea

divyashree 03-22-2010 12:10 AM

. 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 .

Tinkster 03-22-2010 12:48 AM

Quote:

Originally Posted by divyashree (Post 3907162)
. 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

hardcorelinux 03-22-2010 12:53 AM

Quote:

Originally Posted by divyashree (Post 3907162)
. 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

saagar 03-22-2010 01:36 AM

I have never seen a dot after the file permissions..thats an info for me too..

divyashree 03-22-2010 02:29 AM

Quote:

Originally Posted by divyashree (Post 3907162)
. 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 .

zhjim 03-22-2010 03:25 AM

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--


marozsas 03-22-2010 06:43 AM

@ 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.

ikisham 04-05-2012 09:20 AM

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.

vmpanzer 07-26-2012 05:19 AM

Quote:

Originally Posted by ikisham (Post 4645477)
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 /]#


linuxew 11-10-2015 01:43 PM

question:what is the Dot at the end of permission of a file:
Answer: This mean this file has SELINUX context.

hope you got a clue or someone who has same question.

thanks

jackal242 08-14-2016 07:26 PM

How to remove SELinux Context from files
 
I think this is what you want.

The following command will remove the "dots" (will remove the SELinux context).

This will remove all the SELInux context from all files and directories in /home:


# find /home -exec sudo setfattr -h -x security.selinux {} \;


All times are GMT -5. The time now is 01:06 PM.