LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-21-2005, 01:02 AM   #1
biswajit_dey
LQ Newbie
 
Registered: Jul 2005
Posts: 3

Rep: Reputation: 0
Not able to go to other user's home directory


Hi,
I am getting a permission denied message if i try to go to some other usrs home directory

e.g if i give cd ~test to go to test's home directory i get a message like this.

-bash: cd: /home/test: Permission denied


Also, I am not able to copy any files from other user's directory to mine.

e.g if i give cp ~test/temp i get a message like this

cp: cannot stat `/home/test/temp': Permission denied


Can neone help me out.
 
Old 07-21-2005, 01:11 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
I can cd ~username to another user's directory as other than that user,
but I don't see the point, because I cannot execute any commands as
other than that user, unless I'm root. Unless you change perms on the
directory where other users have rights.

Read this thread, especially the part about group.

Last edited by Bruce Hill; 07-21-2005 at 01:16 AM.
 
Old 07-21-2005, 01:30 AM   #3
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Um, if you could then people could go around deleteing each others files and copy homework and the like. thats kind of the point of file permisions on a multi-user system so you can't mess around with files that don't belong to your user. if it's your box su to become root then you should have access to everything. If you want you can then change the permisions so your user has access with chmod like this:

chmod 666 file

666 - everyone can read and write

777 - everyone can read write and exicute (or in the case of a directory enter)
 
Old 07-21-2005, 05:17 AM   #4
Artik
Member
 
Registered: Apr 2005
Location: Israel
Distribution: Debian 3.1 Sarge, Ubuntu Breezy
Posts: 223

Rep: Reputation: 30
Re: Not able to go to other user's home directory

Quote:
Originally posted by biswajit_dey
Hi,
I am getting a permission denied message if i try to go to some other usrs home directory

e.g if i give cd ~test to go to test's home directory i get a message like this.

-bash: cd: /home/test: Permission denied


Also, I am not able to copy any files from other user's directory to mine.

e.g if i give cp ~test/temp i get a message like this

cp: cannot stat `/home/test/temp': Permission denied


Can neone help me out.
Two possible resons (that I think on them):
  • User "test" had denied permossions for reading his directory by setting chmod 700 - I also do this for sertain directories to prevent read access of other people - so you should talk to him
  • Default umask is something else then 0022 for this user or in system... Default setting may be different - not allowing other user view and brows directories. Take a look on /etc/profile. (grep umask /etc/profile )
 
Old 07-21-2005, 05:24 AM   #5
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
unless you get permission by the user who ownes the directory, you should not even try to get into his home dir.
 
Old 07-21-2005, 07:28 AM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
It's not like there's anything in there that you should want anyway-- /home/username is mostly full of personal config files by default. If the other user has been "foolishly" saving data there that you have a reasonable need or right to have access to , then the other user should share the folder in which that data is kept via the distribution's file-sharing configuration.

In other words, the user's home directory is private and exclusive to the user-- it's their house, and the door is locked. No one else has the right to just walk in and snuffle around without the owner's express permission (the user unlocks the door and lets you in to use the toilet, and only the toilet, i.e., sharing the "toilet" folder with someone else), with the exception of the police or fire department (root), and even then, only with a good reason (the user is broke and root needs to fix it). Otherwise, "there's nothing to see here in another user's /home folder, move along".
 
Old 07-21-2005, 09:14 AM   #7
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
nice one motub :-)
 
  


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
Permission problems when removing user's home directory. davethegenius Linux - Software 3 08-11-2005 05:01 PM
Reading other user's home directory with Samba zupidupi Linux - Networking 7 04-14-2005 02:53 AM
Changing user's home directory? HOW barton Debian 10 04-04-2005 03:27 AM
finding user's home directory within a daemon kurienmathew Programming 1 12-19-2003 04:22 AM
how to change a user's Home directory n1wil Linux - General 8 08-24-2002 04:22 PM


All times are GMT -5. The time now is 09:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration