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-24-2010, 11:02 AM   #1
nhelder
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
root unable to access folder


Hi, all~

I'll start with the question, then go in to the background: is there a command to grant root permissions to a file/folder that is owned by another user?

Background: ran an installer as a standard user that created a bunch of files and folders, and root is unable to access them. If I do a "chmod o+xr" (as the user that ran the installer) on one of these file/folders, root is then able to access/read them.

This seems strange to me - I was under the impression root could read/access anything, regardless of who created/owns it...?

I'd rather not have to run through the file system granting 'others' access to things... I'd rather leave the permissions as they are but allow root to access the other user's files.

Or, maybe this is an intentional security measure? Would I need to add root as a member of the user's private group in order to grant this access?

FYI, this is on RHEL 5.5 x64.

Thanks in advance for your help,

- Nathan
 
Old 09-24-2010, 11:23 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Consider: why does the system administrator need to access a users private files? (My objection may be cultural - NZ has laws making this sort of thing an invasion of privacy.)

However - I take it that you have rw access as root to all other files created by that user?
If so, then we'll want to know what the installer you ran was. It looks like some sort of mandatory access has been invoked: do you run SELinux or somesuch?

You can "fix" the immediate problem by running chmod recursively.
 
1 members found this post helpful.
Old 11-29-2010, 10:22 AM   #3
nhelder
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Hi, Simon~

Thanks for your reply.

Yes, it makes sense that admin users wouldn't be able to access user files.

However, in this case I was dealing with shared software installed outside of the user's home directory, and root needed permissions to be able to start/stop that software at machine startup/shutdown.

Doing a chmod recursively would have been an approach, but I didn't want to grant access to all 'other' users on the system - just the user that installed the software and root (and I wasn't sure how to do that using the chmod command).

Because the user account in question is essentially a system account anyway (shared account that other users can su to), I ended up adding root to that account's private group. As expected, this allowed root to access all of that account's files/executables.

Thanks,

- Nathan

P.S. Sorry for the delay in getting back to this.
 
Old 11-29-2010, 03:52 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
If the files are owned by the user, then set the owner permissions to rw. An alternative is to set the group to something handy, change group permissions to rw, and make the user a member of the group.
 
  


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
Unable to access webserver folder chickenjoy Linux - Server 5 10-26-2009 12:57 AM
Apache root folder access j.gonsalves Linux - Newbie 1 03-22-2009 06:02 AM
Limit access to folder from all, even root robinsodergren Linux - Security 9 03-12-2009 10:11 AM
Unable to access folder phodopus Slackware 12 12-18-2008 08:49 AM
Prevent access to root folder ]SK[ Linux - Security 6 08-14-2007 06:48 AM

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

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