LinuxQuestions.org
Visit Jeremy's Blog.
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 11-17-2003, 03:31 PM   #1
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Rep: Reputation: 30
file permissions


I have created two user account myself and a friends, when my frind logs in and opens a openoffice document, and chooses to save that document in *my* home directory he cant... which is good and which is what i want... but....he still can *see* whats in my home directory.

Is it possible to prevent this ?

i.e stop him seeing any files at all that belong to me ??

tia.
 
Old 11-17-2003, 03:43 PM   #2
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
If you do
'ls -l /home/'
the permissions on your home directory should be like this:
'drwx------ 4 gene users 4096 Nov 13 19:00 gene'
If not, adjust as nessesary. If they are that, then its openoffice specific thing, and you can do nothing about it.
 
Old 11-17-2003, 03:47 PM   #3
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Original Poster
Rep: Reputation: 30
When i do an "ls -l" i get ;

drwxr-xr-x 23 Bill users 1528 2003-11-17 20:29 Bill
drwxr-xr-x 51 John users 3736 2003-11-17 20:30 John

This isnt correct then ?

Could someone give me an example how to change them ?
and what are the numbers 23 and 51 for after the permissions ?

tia
 
Old 11-17-2003, 03:55 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Don't allow others to change into your home,
or read files in your home itself...
chmod a-rwx, u=rwx /home/<youruser>

Remove read, write and enter(execute) for all but your user
for all subdirectories:
find /home/<youruser> -file d -exec chmod a-rwx, u=rwx {} \;

Remove read, write and for all but your user
for all files in all subdirectories:
find /home/<youruser> -file f -exec chmod go-rwx, u+rw {} \;


Should do the trick :)


Cheers,
Tink
 
Old 11-17-2003, 03:56 PM   #5
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
good, basically your folder permissions are messed up. Everyone can see private folders. Thankfully they cannot write to them, only read and execute. Here is the command you have to run to fix them:
'chmod u=rwx,g=,o= /home/[yourdir]'
 
Old 11-17-2003, 03:57 PM   #6
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
Tink beat me to it. Good work, either do what he sais or what i say, its the same thing.
 
Old 11-17-2003, 04:01 PM   #7
gazza
Member
 
Registered: Jun 2003
Distribution: Mandrake 10.1 Official
Posts: 157

Original Poster
Rep: Reputation: 30
Great,.... thanx guys
 
  


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 01:00 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 06:35 AM
CVS - file permissions and file ownership Osten Linux - Software 3 01-18-2004 05:08 PM
file permissions and file owner won't change Nadim Slackware 5 11-29-2003 07:03 PM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 05:42 PM


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