LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 09-15-2009, 03:56 AM   #1
sabahh
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Private directory


How do i create a simple private directory in linux as a regular user ??
 
Old 09-15-2009, 04:02 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by sabahh View Post
How do i create a simple private directory in linux as a regular user ??
private as in only you can access it right?

one way is to -
create the directory with the permissions 700.

Code:
mkdir -m 700 directory_name
only the directory owner has full access rights here.
 
Old 09-15-2009, 04:04 AM   #3
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
change the permission of your folder by
Code:
mkdir yourdirectory
chmod -R 700 yourdirectory
note:root can do anything(even change the permission or ownership) in your directory and you cant restrict him any way.. he is the GOD of the machine.

Last edited by mobinskariya; 09-15-2009 at 04:05 AM.
 
Old 09-15-2009, 04:04 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Private directory? Do you mean a directory that is not accessible to others?
If this is what you want, create a directory with

mkdir /path/to/directory

And change the permissions on it. If you do not even want others to read

chmod 700 /path/to/directory

Ok. centosboy and mobin beat me on this with couple of mins. But this as fast as I can type.

Last edited by linuxlover.chaitanya; 09-15-2009 at 04:05 AM.
 
Old 09-15-2009, 04:07 AM   #5
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
@ linuxlover.chaitanya

Last edited by mobinskariya; 09-15-2009 at 04:09 AM.
 
  


Reply



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
Accessing a private LAN from another private LAN sholah Linux - Networking 3 07-10-2007 08:17 PM
Make home directory private to other users wilberto83cg Linux - Software 4 08-22-2006 10:27 AM
LXer: Keep your private documents private LXer Syndicated Linux News 0 06-07-2006 03:21 AM
?? Private Pix ?? g452 Linux - Software 0 05-15-2004 06:53 AM
Private Messages javax LQ Suggestions & Feedback 1 04-19-2002 08:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:07 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