LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-05-2010, 09:54 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
Program run as root, configfiles writable by 'user'


If I have a program running as root, can I have the config files as follow :

Code:
-rw------- 1 user user 50310 Mar  5 15:16 configfile.conf
Root will be able to read the config-files, right ??

And only the user 'user' will be able to change the config-files, right ?
 
Old 03-05-2010, 09:58 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Yes, root can do anything.

Be careful though. You don't want users passing malicious commands by putting them in the config file and getting root to execute them.
 
Old 03-05-2010, 10:09 AM   #3
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
Tell me if I'm safe :

This 'user' has no shell (/sbin/nologin) and is chrooted with vsftp to the directory that holds the config files.

With a safe FTP-password, am I correct that only I with this 'user' can edit the config files with my FTP-program ??
 
Old 03-05-2010, 10:14 AM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Yes, as long as no one else uses your ftp program.
As long as no other users can traverse the directory tree into that users directories, then they can't even see it.

But root sees all ;-)
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i run a java program with root privilages from a non-root account? joyjjs Linux - Software 1 08-04-2009 12:14 AM
How can I have a script owned as root and run as root by a user: setuid? stickey bit? abefroman Linux - Newbie 9 04-19-2008 05:15 PM
vsftpd error: refusing to run with writable anonymous root abd_bela Debian 2 04-15-2008 05:42 AM
why lftp command run failed when user isn't root, but ok when logining as root steven_yu Linux - Software 0 06-06-2007 08:36 PM
Run program from root login as non-priveledged user? pr0wl3r Linux - Security 3 08-17-2004 09:52 PM

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

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