Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-09-2007, 10:36 AM   #1
Registered: Mar 2001
Location: FL
Posts: 257

Rep: Reputation: 30
user access to files owned by root

Hi All,

I want to create a user , call it LOG, to access the log files on my Centos 4.5 box (/var/log). The files within this directory have the permissions of 640 (rw-r-----). How can I safely allow this user to read these files without making the permissions 644? I want only root and this LOG user access to them.

Can I use sudo?

Old 07-09-2007, 10:56 AM   #2
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Admin Groups

Could add the user to the admin groups.
Old 07-09-2007, 12:58 PM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
file permissions are by user and group. You can't give someone the privileges of another user without giving them that password. Thus the common way of doing what you want is with groups. For example:

chown :specialgroup filename assigns filename to "specialgroup"
chmod X6X filename gives read-write permissions to the group (replace "X" with appropriate values for owner and others)
usermod -a -G specialgroup username adds username to specialgroup


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
chown-ing all files on a drive owned by one user. nkoplm Linux - General 1 10-26-2006 07:20 AM
all users have access to root owned files sakatola Linux - Security 2 07-22-2005 01:45 AM
List files owned by user/group guideweb Linux - General 1 09-18-2004 09:18 PM
Make a file owned by root owned by a user sharpie Linux - Newbie 2 02-26-2004 02:26 AM
vfat mount - all files are 'root' owned, but even root can't -WX d33pdream Linux - General 5 02-28-2003 03:38 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration