LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-04-2007, 08:07 AM   #1
rino.caldelli
Member
 
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181

Rep: Reputation: 31
first /home/user directory: permissions bug!


I noticed by trying to add a second user "user2" in ubuntu 6.06 that the permissions of my first user "user1" where drwxr-xr-x which means that by Default Ubuntu lets any other added user have access to my user1 directory!!!

I was giving VNC access to user2 and fortunately noticed that he could actually sneak in my user1 home directory!!!!

what do you think????
 
Old 03-04-2007, 08:26 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,153

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
If you want to keep people out of your home directory, then change its permissions:
chmod 700 /home/user1
 
Old 04-17-2007, 04:50 PM   #3
rino.caldelli
Member
 
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by tredegar
If you want to keep people out of your home directory, then change its permissions:
chmod 700 /home/user1
yes I know that... but the point indeed is that ubuntu 6.06 has a little glitch here.. Still have to check 6.10!!
will someone check it for me?
 
Old 04-17-2007, 05:32 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
This is the default behaviour on many Linux distros. You can change this behaviour by adjusting the umask value in /etc/profile (this will only affect new users). For existing users, use chmod as mentioned above.
 
Old 04-18-2007, 07:29 PM   #5
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Quote:
Originally Posted by rinonapo
yes I know that... but the point indeed is that ubuntu 6.06 has a little glitch here..
One man's bug is another man's feature. For a home network, I want other users to have read access to my home directory. If that's not appropriate for your purposes, you're free to change it, but that doesn't make it a bug.
 
Old 04-18-2007, 07:40 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
On other distro's, a group is created for each user by the same name and that is used for the default group. I am currently using SuSE and it uses the users group instead. You could manually create a group for each user and make that a users default group if you wished.

Last edited by jschiwal; 04-18-2007 at 09:13 PM.
 
Old 04-19-2007, 11:28 AM   #7
rino.caldelli
Member
 
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by AdaHacker
One man's bug is another man's feature. For a home network, I want other users to have read access to my home directory. If that's not appropriate for your purposes, you're free to change it, but that doesn't make it a bug.
That sound a little "Windows-like" attitude... by default a computer should permit the least possible.. if you wanted a feature which could be a risk for a generical unknowing user *You* should manually edit permissions!!!
In that way I consider it a bug...
 
Old 04-19-2007, 04:33 PM   #8
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Quote:
Originally Posted by rinonapo
if you wanted a feature which could be a risk for a generical unknowing user *You* should manually edit permissions!!!
Exactly what risk are you referring to? There's nothing inherently insecure about letting other users read your home diectory. Did you have some particular scenario in mind?
 
Old 04-19-2007, 04:38 PM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
My take on this. Its not a bug and it does not need fixing because you can use umask to change permissions on home directories. If you want a distro that has private groups (meaning that other users can't browse your files) right out of the box, then use the likes of Redhat, Fedora, Mandriva etc. If you like Ubuntu, then just change your umask value before adding other users to the system and change the perms for the admin users home directory.
 
Old 04-20-2007, 03:06 PM   #10
rino.caldelli
Member
 
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by AdaHacker
Exactly what risk are you referring to? There's nothing inherently insecure about letting other users read your home diectory. Did you have some particular scenario in mind?
When I think of a folder for each user I implicitly think it is my folder only not everyones... If I put valuable data in it I should know any user on the computer can read/modify it..
I discovered the risk by giving vnc access to a special limited account to internet users and discovering these users could tamper the whole /home/ directory!!
 
Old 04-20-2007, 05:02 PM   #11
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Quote:
Originally Posted by rinonapo
these users could tamper the whole /home/ directory!!
In what way does read-only access allow tampering? I don't know how you can tamper with something if you can't change it.

Your interpretation of user home directories is not unreasonable, it's just not the interpretation the Ubuntu devs take. For a home desktop where only trusted users can log in, private home directories can be more of a nuisance than a benefit. This goes especially for non-technical users who may not understand how file permissions work and just want to look at that photo little Johnny downloaded yesterday. Since Ubuntu is supposed to be "Linux for human beings," the devs probably figured cattering to that group was the most user-friendly choice. It's not an error, just a difference in priorities.
 
Old 04-21-2007, 12:37 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
For a home environment, it would make it easier for users to share files. If you are running a multiuser server, you already know about changing group ownership and the like because that is how you would set up groups for the sake of sharing files. One way isn't right, it's just two ways of doing things. You can easily change it if you want.
 
  


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
Active Directory User Cannot Write to Samba Home Directory jonwatson Linux - Networking 2 12-19-2006 12:40 PM
default permissions for home directory gerghk Slackware 2 11-02-2006 01:01 AM
Home directory permissions bug Ammad Linux - General 1 03-02-2006 04:08 AM
permissions of my /home/"user" directory error darkleaf Linux - Software 10 09-26-2004 02:08 AM
Users home directory. Permissions. jsbush Linux - Newbie 4 10-29-2003 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:00 PM.

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
Open Source Consulting | Domain Registration