LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permissions Denied (https://www.linuxquestions.org/questions/linux-newbie-8/permissions-denied-685068/)

kapilbajpai88 11-20-2008 11:50 PM

Permissions Denied
 
Hi All,
I am using RHEL5 and I have two users on it. When i log in as Oracle user and try 'su user2' with password, it is allowing to switch users properly, but when i try any command on User2, it is giving the error "Permission denied".

Here is what , i tried :
[oracle@comp1 ~]$ ls
database Desktop
[oracle@comp1 ~]$ su user2
Password:
[user2@comp1 oracle]$ ls
ls: .: Permission denied

Could anybody please suggest me how can i manage the permissions for this?

Thank You in advance,
Kapil.

kenneho 11-21-2008 12:50 AM

Hi.


Perform the same test, but before issuing that last "ls" you issue "pwd" and "ls -l", and post back the result.

lazlow 11-21-2008 01:11 AM

Ok, su gives you the permissions of the new login but the path of the old login. So in this case you have user2's permissions but Oracle's path(so ls gets lost). If you use su - user2 (su space dash user2) this will give you the permissions and path of user2.

nidhinmd 11-21-2008 01:12 AM

The 'permission denied' is displaying because user2 is on home directory of user 'oracle'. Normal users are not allowed to view the home directory of another user. Also use command 'su - user2' for switching to user2's home directory.

kapilbajpai88 11-24-2008 05:06 PM

permission denied
 
Hi There,
thank you all.....
It was just a small thing but i was not getting it that time.

Thank You all once again,
Kapil.


All times are GMT -5. The time now is 03:16 AM.