LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2013, 01:56 PM   #1
vignesh_murali2003
LQ Newbie
 
Registered: Jun 2013
Posts: 24

Rep: Reputation: Disabled
Could not chdir to home directory


Could not chdir to home directory /net/tiger/home/vlad: Permission denied
-bash: /net/tiger/home/vlad/.bash_profile: Permission denied

all the users when I try to ssh have the same problem. But when I login from other system it is working fine. I checked with the permissions it is set correctly.
 
Old 06-08-2013, 02:57 PM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Are you logged in as vlad when you get that error message? Can you post the output of
Code:
ls -l /net/tiger/home/
jdk
 
Old 06-08-2013, 03:43 PM   #3
vignesh_murali2003
LQ Newbie
 
Registered: Jun 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
ls: cannot open directory /net/tiger/home/: Permission denied

the permissions are 700 but when i set it to 755 it works. But for my company rules it should be 700

Last edited by vignesh_murali2003; 06-08-2013 at 03:45 PM.
 
Old 06-09-2013, 12:58 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
You didn't answer my question. Who owns the file/directory and who are you logged in as.
Mode 700 allows only the owner of the file/folder to read it. Mode 755 allows anyone to read it. I deduce that you are not logged in as the owner of the file/folder. If you log in as the owner of the file/folder then your command will succeed.
Got it?
jdk
 
Old 06-09-2013, 01:22 AM   #5
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 505

Rep: Reputation: 137Reputation: 137
home directory must always be set to 755(rwxr-xr-x), and within that all individual users directories must be set to 700(rwx------).

Example:
Code:
$ ls -ld /home
drwxr-xr-x. 5 root root 4096 Jun  9 10:40 /home

$ ls -l /home
total 24
drwx------. 52 user1 user1  4096 Jun  9 10:21 user1
drwx------.  4 user2 user2  4096 Jun  9 10:42 user2
 
Old 06-09-2013, 02:46 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
You must be logged in as user1 to look at the user1 folder or chown to another owner
You must be logged in as user2 to look at the user2 folder or chown to another owner
jdk
 
Old 06-09-2013, 10:04 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
You need to be root to chown files/dirs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not chdir to home directory; permission denied dmz1213 Linux - Newbie 6 09-03-2012 03:02 PM
ssh could not chdir to home directory pccdrussell Linux - General 27 08-24-2012 11:30 AM
[SOLVED] 'Could not chdir to home directory /home/[user]: Permission denied' arashi256 Linux - Newbie 25 11-11-2011 10:29 AM
can't chdir /export/home/user/ perky.nishi Linux - Newbie 5 08-23-2010 01:37 AM
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 05:12 PM


All times are GMT -5. The time now is 06:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration