LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-16-2010, 05:43 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 37
File Permission help needed.


I was going through a security manual for linux server.

At certain point it was mentioned that
files for shell configuration Such as ~root/.login, ~root/.logout, ~root/.cshrc and ~root/.profile, ~/root/.kshrc ~/root/.bash* must be owned by root and must have permissions of 0400, 0600 or 0700

Now i m confused as what does 0 stands for.

According to me first digit is for user second for group and 3rd for others.

How would i set this in my environment?
 
Old 09-16-2010, 06:06 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
The first digit represents the setuid/setgid/sticky bit. If you don't provide it, it's assumed to be 0.
http://en.wikipedia.org/wiki/Chmod
 
Old 09-16-2010, 06:42 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by pinga123 View Post
I was going through a security manual for linux server.

At certain point it was mentioned that
files for shell configuration Such as ~root/.login, ~root/.logout, ~root/.cshrc and ~root/.profile, ~/root/.kshrc ~/root/.bash* must be owned by root and must have permissions of 0400, 0600 or 0700

Now i m confused as what does 0 stands for.

According to me first digit is for user second for group and 3rd for others.

How would i set this in my environment?
Your concept is right , but from that 4 number the 1st one stands for
special permission(SUID,SGID,STICKYBIT),2nd for file owner permission,3rd group owner permmission and the 4th is for other owner permission.


You can google about all these permission issues and how to set them and in which condition the special permission are applied ..
 
Old 09-16-2010, 06:49 AM   #4
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
First character is Special permission.
Another link for special permission

Regards,
 
  


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
Any log file for checking file permission change history in RHEL 5.1? bilalcochin Linux - Newbie 3 04-02-2010 09:57 AM
permission settings issue....Help needed.... varewoolf Linux - Newbie 6 06-06-2009 12:15 PM
change file permission of a mouse device file permanently alexandre_fs Linux - General 5 01-09-2007 06:30 AM
Help Needed for Root Password/permission issues. Ebenonce General 3 08-19-2004 05:57 AM
file permission help needed arka Linux - Newbie 1 12-24-2002 06:44 AM

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

All times are GMT -5. The time now is 02:09 AM.

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