LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Lucid Lynx > No user privacy (https://www.linuxquestions.org/questions/linux-newbie-8/lucid-lynx-no-user-privacy-857878/)

tiomoco 01-21-2011 05:40 PM

Lucid Lynx > No user privacy
 
I run Ubuntu Lucid Lynx and users have access to other users directories and read files. How can i hide and make it all invisible for one another...??? Thank you very much guys.

agreimann 01-21-2011 05:54 PM

Cool. You're running 10.04. To make your folder completely private, you can encrypt your home folder, or those of the users in question that are visible right now. A similar procedure exists for OS X 10.3+ called FileVault, in order to make folders invisible.

Or, you could open a terminal and change ownership/permissions on the folders which you wish to change access, and give access only to users that can see the folders.

However, of the two methods, I would recommend encrypting the home folder. The only issue with that, however, is that if the computer crashes and needs to be redone, you'll have a harder time getting files out of home folders.

Hope this helps. :)

arizonagroovejet 01-22-2011 05:47 AM

Traditionally *nix systems do tend to get users read-only permission on each other's files by default. It's easy to change though.


Login in as each user, open terminal and run
Code:

$ chmod 700 .
Or as root run

Code:

$
$ chmod 700 /home/*


For an explanation of those chmod commands see 'man chmod' or http://en.wikipedia.org/wiki/Chmod or many other places.

All chmod does is change permissions which protects against casual attempts to access the contents. Of course any user with sudo rights can always use that to read the contents of another user's home directory. Also if you have multiple people using the same computer and any of them know how to boot the computer from a LiveCD then they could access other user's files.

FileVault on Mac OS X encrypts the user's home directory. Various solutions for doing that on Linux exist but I don't know what the best one is for Ubuntu. Encrypting home directories increases security but it also increases the risk of you losing access to the files due to filesystem corruption, disk failure, or something daft like forgetting the password. You also have to think about making sure back ups of your home directory are encrypted. (You do make back ups of your home directories don't you? Hopefully you're not one of those people who never makes backups and then is distraught when their computer is lost or stolen or destroyed by fire or flood or lightening or Act of Dog or their harddisk just goes 'clunk' one day and stops working.)

unSpawn 01-22-2011 08:39 AM

Quote:

Originally Posted by arizonagroovejet (Post 4233890)
Or as root run

Code:

$
$ chmod 700 /home/*


Isn't that a rather unsafe approach if 'eval echo /home/*' expands to more than one thinks it will?

rich_c 01-22-2011 09:42 AM

I'd rather use chmod go-rwx rather than 700. That way you don't touch users permissions at all, just group and other.

arizonagroovejet 01-22-2011 10:29 AM

Quote:

Originally Posted by rich_c (Post 4234035)
I'd rather use chmod go-rwx rather than 700. That way you don't touch users permissions at all, just group and other.

Yes, I agree.

Quote:

Originally Posted by unSpawn (Post 4233980)
Isn't that a rather unsafe approach if 'eval echo /home/*' expands to more than one thinks it will?

Um...

Can you give an example of how 'eval echo /home/*' could expand to more than one thinks it will? I can't think of one.
I really should work my way through those bash scripting guides at tldp.org one day. (The site isn't responding right now, hopefully it will be back on line soon)

tiomoco 01-22-2011 12:13 PM

Thanks guys. You've helped plenty..!!!
I have started encrypting new folders with "cryptkeeper". It doesn't encrypt existing folders, so i have to make new ones. There i dump the objects of my shame. Then i log as another user and presto.! 3 folders holding my shit are invisible to regular users.
Merry weekend to all of you..!!

unSpawn 01-22-2011 02:43 PM

Quote:

Originally Posted by arizonagroovejet (Post 4234062)
Can you give an example of how 'eval echo /home/*' could expand to more than one thinks it will?

Using "/home/*" may expand to or include:
- /home/lost+found if /home is a separate mount point,
- any files in the root of /home,
- any directories owned by system accounts (that do not have an inert shell set),
- any directories that explicitly have permissions changed to share access.
An easier way could be to say it is a greedy match if that means something to you. A safer way could be to query /etc/password for accounts with an UID >= 500 (or /etc/login.defs) that also have a valid shell and also a $HOME in /home and also are not used for system services.

arizonagroovejet 01-22-2011 02:47 PM

Excellent, thanks.

tiomoco 01-23-2011 06:26 AM

Cryptkeeper may have a GUI, but it's giving me the creeps. A few folders i created yesterday are gone...So i'd rather go for the command line.

Thank you gringos..!

MTK358 01-23-2011 08:36 AM

Quote:

Originally Posted by tiomoco (Post 4234814)
Cryptkeeper may have a GUI, but it's giving me the creeps. A few folders i created yesterday are gone...So i'd rather go for the command line.

Thank you gringos..!

If you just don't want other user accounts to look at other users' files, I don't think encryption is the solution.

Just use the chmod command (it's not encryption, it just tells the OS not to let other users read it).

tiomoco 01-24-2011 11:41 AM

peeping
 
Quote:

Originally Posted by MTK358 (Post 4234880)
If you just don't want other user accounts to look at other users' files, I don't think encryption is the solution.

Just use the chmod command (it's not encryption, it just tells the OS not to let other users read it).

I'll take your word MTK358. Thanks. Cryptkeeper is letting me learn at my slow pace. However, if chmod just shuts the shades, sounds like fair enough for my privacy issue.

Thank you...!


All times are GMT -5. The time now is 08:14 PM.