I am beginning with the mount and Linux file-system concept. Just as a simple test I have mounted a share from my server(VM) to the client (VM). Things are fine, it is mounted and I could work on it as on a local file system.

And then I tried mounting a share from my physical machine to my client(VM), things are also went fine. But the place where I have been stuck is when I see the color of the shares that I have mounted. Share that mounted from VM to VM is in green and the one I have mounted from physical to VM is look like a normal directory. I haven't used any special option switches while mounting. I wonder what this all about the color thing when mounting, can anyone shed some light?[my distro is debian]

screen shot

As you could see 173_VM is file share mounted from VM and next is file-share mounted from physical machine. The VM one is in green.

  • Can you post a screenshot? and the output of ls -ld for both of the mountpoints (with them mounted)? – I_GNU_it_all_along Sep 14 '16 at 11:54
  • @I_GNU_it_all_along I've posted – RaGa__M Sep 14 '16 at 11:59

I assume that you are using ls which is coloring the directories/files.

ls colors directories and files based off what they are what permissions they have, it does not care about mount points. It is likely that the permissions are different for the different ways you have mounted the remote shares. Use ls -l to see what permissions, as well as other information, the directories have.

The actual coloring depends on what version of ls and what color schemes you have on your terminal but for me a green background indicates that a folder has world writable permissions (ie anyone can write to the folder):

<code>ls -l</code> output

  • Micheal Daffin, why it is that,I have used same mount command with the default options on both. – RaGa__M Sep 14 '16 at 12:07
  • It will be the permissions that the share is exporting and controlled server side. – Michael Daffin Sep 14 '16 at 12:14

In this case, The green colouring is displayed due to the "sticky bit" being set on the directory. This is denoted by the "t" in the permissions (notice that the other one doesn't have the t).

This essentially just means that the directory is writable by all users on the system but only the owner of a file within can delete/rename it to prevent accidental destruction.

For more in depth information on sticky bits here is a comprehensive explanation.


To begin with, the coloring in the output of ls is configurable (by way of the environment variable LS_COLORS, see this answer on ls coloring). Now, the green color in the figure for 173_VM is due to the sticky bit set which you can see by the t to the right in the first field.

Try this:

ls -ld /tmp

and if you haven't meddled with LS_COLORS (or the permissions of /tmp), then /tmp should be displayed green as well.


mkdir -m 1777 xyz
ls -ld xyz

Anyway, the odd permissions strike me: --S--Srwt is octal 7007, and that doesn't make sense altogether.


I wonder what this all about the color thing when mounting, can anyone shed some light?

The colors of ls can represent the permissions, the defaults for some systems is to show directories where everyone has write permissions with a green background:

You can change the default color as bellow:

Export the directory colors database:

dircolors --print-database > ~/.mydircolors

Open it with your favorite editor (nano ~/.mydircolors),Modify or add the missing file extension as you like, then open your .bashrc:

Comment out the following lines, to get:

# You may uncomment the following lines if you want `ls' to be colorized:
 export LS_OPTIONS='--color=auto'
 eval "`dircolors`"
 alias ls='ls $LS_OPTIONS'
 alias ll='ls $LS_OPTIONS -l'
 alias l='ls $LS_OPTIONS -lA'

Modify eval "dircolors" to :

eval "`dircolors ~/.mydircolors`"

Save and exit.

Not the answer you're looking for? Browse other questions tagged or ask your own question.