LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-26-2014, 05:37 AM   #1
swapz
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Rep: Reputation: 0
Post What Basic permission to be set for new Created User in Linux?


Hi,
I am new in Linux operating system.

i have just install Linux 6 on to my laptop. there I tried to create a Directory.

When i tried to create directory as Root user login it is done... but its has bee created in "/" (Root)! I used terminal to create the Directory, Done the Right Click on Desktop > Open terminal.
mkdir -p /Test/dir (its has been created under /)

After this I have Added a User with Password; Used this credential for Login and tried to Create A Directory using
mkdir -p /Test/Dir1 (Access Denied Message)

What Basic permission to be set for new Created User in Linux?
 
Old 06-26-2014, 06:22 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Can you tell us what Distribution (Distro) of Linux you are using. "Linux 6" doesn't mean anything, at least not to me. I have heard of Debian 6 (whose release name is "squeeze") and "Debian" is a distribution. Until you tell us what system you are using it will be hard to offer concrete suggestions.
jdk
 
Old 06-26-2014, 06:27 AM   #3
swapz
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry for improper input, Distribution is Red Hat
Red Hat Linux 6
 
Old 06-26-2014, 06:36 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
So you've paid for RHEL then you can contact their support line. If you haven't paid then try CentOS.
jdk
 
Old 06-26-2014, 06:45 AM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,479

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
It is normal that users (non-root users, that is) are not allowed to write in the root directory -- and they should not be allowed to do so.

Users work in their home directory, usually /home/username. They own that directory (not /home, which is owned by root, but their own directory) and they can create directories and files in their home directory.

If you're coming from, say, Windows (where you can read, write and destroy things anywhere your little heart desires), you've just experienced the difference: users can't willy-nilly create, alter or remove system files (those in the root file system directories). This is a Good Thing. And, this Good Thing should not be circumvented for any reason.

Default permissions for users (all users, including root) are usually 022; that's an octal number that sets permissions for the owner, group and public access to directories and files. The owner is the user account that owns the file or directory (generally the user that created it), the group is the group the user belongs to (users) and public is anybody else that has access to the system.

If you open a terminal window and do this:
Code:
touch junk
ls -l junk
-rw-r--r-- 1 trona users 0 Jun 26 06:30 junk
The touch utility "touches" a file; if the file doesn't exist, it is created. The ls utility displays information about a file or directory; ls -l display shows (the -rw-r--r--) show that the owner (-rw-) has read-write premission, the group (-r--) has read permission and public (the last r--) has read permission. The rest of the stuff, my user name, my group name, the created date and the file name.

If this were a directory, it's slighty different:
Code:
mkdir test
ls -al test
total 24
drwxr-xr-x   2 trona users  4096 Jan 13  2010 ./
drwxr-xr-x 102 trona users 20480 Jun 26 06:30 ../
The permissions mask is the same as a file but there is a d that identifies test as a directory. There are two lines listed for the directory, the first is the directory itself and the second is the parent of my home directory (which happens to be /home).

You can do some reading in the manual pages for ls, touch and the "SEE ALSO" manual pages for each of those (they're at the bottom of the individual manual pages).

Just don't try to override the system defaults until you really understand what you're doing (and the consequences of doing it); users are not allowed to write in the root tree for a lot of really good reasons, leave it be.

Hope this helps some.

Last edited by tronayne; 06-26-2014 at 06:46 AM.
 
Old 06-27-2014, 01:36 AM   #6
swapz
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Smile

I say It helps A Lot for Beginners like me.
Very thanks for this shared Information with example ! Could you please suggest What
Operating system is useful to get hand on to Linux, I am using trial-ware RHEL6 now.

please suggest.
 
Old 06-27-2014, 01:55 AM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

as jdk said you can use CentOS. CentOS is very similar to RHEL, but it is completely free. If you don't care about using something similar to RHEL, you have a huge range of choices. I can't suggest what is best for you because I don't know you needs etc.

Evo2.
 
Old 06-27-2014, 06:55 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
You can always have a look at Distrowatch. This will give you some idea of the choices available to you now.
jdk
 
Old 06-27-2014, 07:08 AM   #9
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,479

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
Quote:
Originally Posted by swapz View Post
I say It helps A Lot for Beginners like me.
Very thanks for this shared Information with example ! Could you please suggest What
Operating system is useful to get hand on to Linux, I am using trial-ware RHEL6 now.

please suggest.
There are many publications available that provide an introduction to Linux. One that you may find useful is the Linux Documentation Project's Introduction to Linux at http://www.tldp.org/LDP/intro-linux/html/.

Hope this helps some.
 
Old 06-27-2014, 08:36 AM   #10
swapz
LQ Newbie
 
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,

Thanks for replies, Currently I am working As windows Admin, in Small industry.

Want to Works as Linux Admin too; As I searched in Server Side Operating Systems found the Best results for Linux only; it means most of the huge Setups are handled by Linux Servers.

Cent-OS will be Best Option it means!

Last edited by swapz; 06-27-2014 at 08:39 AM.
 
  


Reply

Tags
linux, rhel 6


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
changing home directory permission in user management after user created in suse(KDE) hamedhsn Linux - Security 4 04-06-2011 10:18 PM
Set the linux user permission beparas Linux - General 2 02-14-2009 06:33 AM
how to set the new user created right as admins in linux 7.3 ? melvinong Linux - Server 2 04-15-2008 08:45 AM
How to set permission of a file created by java? emanresu Linux - General 4 01-23-2008 02:54 AM
Use Apache Basic Authentication with user-created form ClarkWGriswold Programming 3 01-09-2008 04:51 PM


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