1846778 Members
4573 Online
110256 Solutions
New Discussion

cd "no permission"

 
SOLVED
Go to solution
Sanjiv Sharma_1
Honored Contributor

cd "no permission"

Env: HP-UX 11.11

I have a user "a" and user "b". Both belong to a group "c".

I have a folder "item" with the following permission
drwxrw---- 2 a c 96 Aug 10 15:47 item

As a user "b", I am unable to do
$ cd item
no permission

When I give the permission 770 then it works.
drwxrwx--- 2 a c 96 Aug 10 15:47 item

Mean as a user "b", I am able to do
$ cd item

Why does it required an execute permission for group "c" to just "cd" by user "b" to the folder owned by "a"?
Everything is possible
5 REPLIES 5
Mark Grant
Honored Contributor

Re: cd "no permission"

Because in order to "cd" to a directory, the user has to be able to search it. "x" means search.
Never preceed any demonstration with anything more predictive than "watch this"
Vibhor Kumar Agarwal
Esteemed Contributor

Re: cd "no permission"

The second component of the 9 letter permission code is for users of the same group.

b is of same group but you need an execute permission to enter into an directory.
Vibhor Kumar Agarwal
Devender Khatana
Honored Contributor

Re: cd "no permission"

Hi,

For a user to cd to a directory exeecute permission is required. Here as it is a user of same group you need to have it for same group.

HTH,
Devender
Impossible itself mentions "I m possible"
melvyn burnard
Honored Contributor
Solution

Re: cd "no permission"

permissions on a directory have different meanings to permissions on a file.
Essentially, setting "x" on a file means that the file can be run or executed, while setting "x" on a directory means it allows you to search the directory, or go into it using "cd dirname".

man chmod
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Sanjiv Sharma_1
Honored Contributor

Re: cd "no permission"

Thank you all.
Everything is possible