more permission problem

Nils Kassube kassube at gmx.net
Sun Mar 15 06:40:07 UTC 2009


Mahadi Hasan wrote:
> I checked out the permissions of folders/files in my home directory
> on the command line, and I found that all the folders (Documents,
> Music, Public etc.) have permission like this: drwxr-xr-x,
> and, only one folder named Examples which has permission like this:
> lrwxrwxrwx, and a file which was created by me has permission like
> this: -rw-r--r--.
> My questions are:
> 1. What do d and l at the beginning of the permission mean?

d = directory
l = symbolic link

> 2. Why can't I access the Examples folder, and even change the
> permission? How do I change the permission of this folder?

What do you mean by "access"? Did you try the cd command or something 
else? As it is a symbolic link you can't change the permissions. Links 
always have lrwxrwxrwx and the real permissions are from the file or 
directory they are pointing to. If you list your directory with "ls -l" 
you can see where the link is pointing to at the end of the line. There 
you can probably read "Examples -> /usr/share/example-content/" which 
means that the Examples directory really is located 
at /usr/share/example-content/. However that directory is a system 
directory (i.e. outside your home directory tree) and the permissions 
of system files / directories can't be changed by individual users. Do 
you really want to change something there? If yes, why?

> 3. Why isn't there anything like d or l at the beginning of the
> permission of the file?

The file you created is an ordinary file. Only directories have a "d" 
and only links have a "l" at the beginning. Try these commands to see 
the differences:

mkdir this_is_a_directory
touch this_is_an_ordinary_file
ln -s this_is_an_ordinary_file this_is_a_link_to_a_file
ln -s this_is_a_directory this_is_a_link_to_a_directory
ls -ld this_*


Nils




More information about the ubuntu-users mailing list