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 - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-09-2011, 12:08 PM   #1
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 294

Rep: Reputation: 10
Just a doubt!!!??


Hi ,

Is it possible to do the server configuration, with all the

directories have 644 permission alone? , like all our important

folders like

1. named

2. httpd

3. lib

etc etc

for security purpose??
 
Old 07-09-2011, 12:25 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Possible? Well, yes, but...

If you
Code:
fubar-trona-/home/trona: mkdir trash
fubar-trona-/home/trona: chmod 644 trash
fubar-trona-/home/trona: ls -al trash
/bin/ls: cannot access trash/..: Permission denied
/bin/ls: cannot access trash/.: Permission denied
total 0
d????????? ? ? ? ?            ? ./
d????????? ? ? ? ?            ? ../
fubar-trona-/home/trona:
Do you see the problem (the owner -- nor anyone else but root -- cannot read the thing)? Not a good idea.

Directory permissions are not the same as file permissions; the default for a directory is 755 where the default for a file is usually 644. If you want to deny public read on a directory, set it to 750 (thus the owner and group can read, the owner can write). Similarly, set a file to 640 and that will allow the same for owner and group.

The default 755, 644 mask is the UMASK value (which is 0022, you can see it with the umask utility. Refer to the umask manual page for other possibilities.

Hope this helps some.
 
Old 07-09-2011, 12:50 PM   #3
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 294

Original Poster
Rep: Reputation: 10
Hi tronayne,

Thanks for the reply ..u just gave the answer for my other question, which was in my mind,

i am facing one problem now days in my slave server, the zone files are recived from my master

server that files are automatically comes with the /var/named/slaves dir with 644 permission

even i gaved the 755 permission to the slave folder , how is it so?? but once it get 644

permission again the changes that are made in the master server that chnges are not replicated

in the slave server zone file....is that anything related to umask issue??
 
Old 07-10-2011, 07:41 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Check and see what the UMASK value is on both machines:
Code:
prompt: umask
0022
should generally be the default value (directories have mode 0755, files have mode 0644) -- it may also be 0020 in which case directories would have mode 0750 and files would have 0640. umask is probably set in /etc/login.defs; might be worth a look to see what it is.

However, that may not be your problem.

You may want to carefully check (against the manual pages) any settings, changes or additions you made in /etc/named.con along with the files localhost.zone, named.ca, named.local or named.root if you're using them (I believe the examples are in /var/named/caching-example).

Also take a hard look at /etc/default/named and /etc/default/rndc if you made any changes to them.

Essentially, files and directories will be created by utilities with whatever mode is defined by UMASK on the system; if you have added or changed anything having to do with file and directory creation, that's probably where you need to look first. Carefully check your configuration files (the ones having to do with master-slave).

Hope this helps some.
 
  


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
doubt ? ashintoms Linux - Networking 1 07-24-2006 12:05 PM
A doubt !!! gabsik Linux - Networking 1 07-20-2006 12:54 PM
Doubt in C++ zeropash Programming 1 07-05-2005 12:33 PM
a doubt... ashesh Linux - General 6 09-08-2003 01:07 PM
DOUBT .- jordomi Linux - Distributions 2 08-23-2000 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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