Unix - Permission issue

I was able to login as a regular user and able to cd to this directory. How is it possible.

How it understand 2345? based on the below permission, we only have r/w access to owner 2345 and unix does not able to see who is 2345. Can some one advise.

$ ls -ld .
drwx------ 3 2345 dev 8192 Jun  5 10:09 .
$ pwd

$ df -h .
Filesystem            Size  Used Avail Use% Mounted on
NAS device:/vol/tech
                      8.0G  2.1G  6.0G  26% /data/app/dev/tech
ittechlabLinux SupportAsked:
Who is Participating?
skullnobrainsConnect With a Mentor Commented:
the read permission will let you list the files INSIDE the directory
the execute permission will let you access the contained file's metainfo

so basically, unless your shell does some extra checks, there is no reason why you could not cd to a directory even though you are not allowed to read it's contents. you should rather have a look at the permissions on the parent directory if you wonder about that


2345 is an uid on a remote system (could also be a deleted local user). unix systems will handle access rights based on uids. if the uid is not mapped to a name, it only changes the display of ls and the likes but the permissions work the same. you may or may not be able to set permissions for a non-existent user, but they will work properly regardless.


when you mount an nfs volume with no specific options, nfs passes uids verbatim, and the remote system handles them like local ones. if user 1005 is "max" on the client side and "bob" on the server side, max will actually have the same access rights on the server as bob would have if he logged on to the server.

various mount options can change this behavior : nfs supports mapping specific users to other users, map everybody to a specific user, add acls based on client ip... most distributions will setup nfs shares with a default root_squash option that changes uid 0 to guest so you cannot have root access.

when you setup nfs, you need to make sure that either you map users to dedicated accounts, or you keep the uids in sync on all machines
carlmdConnect With a Mentor Commented:
What you are showing is the permissons on a directory, that appears to be a sub directory. What are the permissions or the directory above it, and the files in it?

To confirm, you logged in as a user other than 2345?
ittechlabLinux SupportAuthor Commented:
yes. I am logged in as a user which has different uid.

How I am able to cd to the directory when I am not the owner of this directory.
ittechlabLinux SupportAuthor Commented:
when I mount NFS file system, how is the permission works.  Can you please explain in me detail.
So the directory you are talking about is NFS mounted from a windows (or what type) system?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.