LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-19-2012, 12:21 AM   #1
russthom@tx.rr.com
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
File Permissions of subdirectories


I am perplexed. I am upgrading from CentOS 4 to 6. In the old system I had a file structure that looks like this in var log.

================== old system ====================
define ("ENV_LOGDIR", "/var/log/db/cto/")
/old/var drwxr-xr-x. root root
/var drwxr-xr-x.root root
var/log (drwxr-xr-x. root root)
├── [drwxr-xr-x root root 4096] db
│** ├── [drwxrwxrwx root root 4096] cto
│** │** ├── [-rw-r--r-- daemon daemon 173853] login1106
│** │** ├── [-rw-r--r-- daemon daemon 32464] login1107
│** │** ├── [-rw-r--r-- daemon daemon 3048] login1108
│** │** ├── [-rw-r--r-- daemon daemon 17179] login1109
│** │** ├── [-rw-r--r-- daemon daemon 43636] login1110
│** │** ├── [-rw-r--r-- daemon daemon 25282] login1111
│** │** ├── [-rw-r--r-- daemon daemon 81195] login1112
│** │** └── [-rw-r--r-- daemon daemon 156486] login1201

As you can see, daemon does not have rights to directories above the cto subdirectory where they get all user rights. On the new system, I have tried to replicate the same rights.

=================== new system =================
define ("ENV_LOGDIR", "/var/log/db/ctonine/");
/var drwxr-xr-x.root root
/var/log (drwxr-xr-x. root root)
├── [drwxr-xr-x apache apache] db
| ├── [drwxr-xr-x apache apache] ctonline


There are a couple of differences -- in the new system apache(uid: 48) is running httpd, not daemon(uid:2). I am not sure if the low UIDs have magical rights. I know you don't have to have write rights to the entire directory structure to have rights at the lower directories (i.e. /home is owned by root rwxr.xr.x and the user subs are given different rights.

Any idea what I am doing wrong. Been a fight a day with this new server, plus keeping the clients happy
 
Old 01-19-2012, 08:43 AM   #2
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 202

Rep: Reputation: 36
What is exactly your problem?

If you wanted to replicate the same rights either you didn't post it right or you didn't change them right. As you can see /var/log/db/cto/ does not have the same rights as /var/log/db/ctonine/ besides /var/log/db doesn't have the same user, db belongs to root in the first system and to apache in the second one.

Who can't write where? or what exactly is not working?
 
1 members found this post helpful.
  


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
searching a file in subdirectories with ls visitnag Linux - Newbie 4 04-23-2009 11:45 AM
Forcing User Permissions on a Directory (and all subdirectories and files in the dir) hevfuture Linux - Newbie 3 03-26-2008 12:39 PM
Changing permissions of folder and subdirectories esc_5p1d0r Linux - Newbie 4 01-13-2007 02:39 PM
permissions not inheriting to subdirectories/files pridefc Linux - Security 4 12-11-2006 12:21 AM
Limited permissions in subdirectories dwz3591 Linux - Newbie 1 04-27-2004 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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