LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-12-2006, 09:49 PM   #1
flycast
Member
 
Registered: Jul 2006
Posts: 89

Rep: Reputation: 15
How can I tell and change what user runs what program?


I have two questions:

1) I have a user called backuppc. Files that are owned by backuppc show up as "backuppc - BackupPC" on the properties window (debian). I have looked at Users and have seen that there is a field called "Name" that has "BackupPC" in it. Is the files that says "backuppc - BacklupPC" really owned by "backuppc" or by "backuppc - BackupPC"?

2) How do I tell what user runs what program when the programs start automatically at boot or by a cron? Once I find this then how do I change it?
 
Old 12-12-2006, 10:42 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Quote:
Originally Posted by flycast
I have two questions:

1) I have a user called backuppc. Files that are owned by backuppc show up as "backuppc - BackupPC" on the properties window (debian). I have looked at Users and have seen that there is a field called "Name" that has "BackupPC" in it. Is the files that says "backuppc - BacklupPC" really owned by "backuppc" or by "backuppc - BackupPC"?
Which application shows this - nautilus (the file manager in the gnome desktop), konqueror (the file manager in the KDE desktop), or something else?

Quote:
Originally Posted by flycast
2) How do I tell what user runs what program when the programs start automatically at boot or by a cron? Once I find this then how do I change it?
Programs started by the sysvinit system run as root, but some daemons may start processes as other users. e.g. the postgres database usually runs it's daemon processes under the postgres user.

Cron has two main ways to launch jobs. Scripts copied to the /etc/cron.daily, /etc/cron.weekly, ... directories are executed as root. Again switching to another user may be done, but this is something the job itself must implement.

The second cron mechanism, is the user level crontabs. Each user who is permitted to, can have a crontab file (in my debian install these are stored in /var/spool/cron/crontabs/). These files are created and edited from the user account with the "crontab -e" command. These are executed as the user whose crontab it is.
 
Old 12-12-2006, 11:06 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Open a terminal and do "ls -l" You will see two name associated with every file and directory. The first is the user who owns the file, and the second is the group it is assigned to. Only the owner (and root) can change the file properties.

To control who can run what, you will typically work with group assignments and permissions.
Quick example:
-rwxr-xr-x 1 root root 5239 2006-10-10 23:57 firefox
Here, everyone is allowed to run the file
Now, change it to this:
-rwxr-xr-- 1 root surfers 5239 2006-10-10 23:57 firefox
Now it can only be run by the owner (root) and any member of the "surfers" group. Add Fred to surfers and now he can run this file.

For more details: man chmod, man chown, plus all the man pages on adding users and groups.
 
  


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
program only runs as root mjkramer Linux - Newbie 5 11-22-2004 11:32 AM
How do you change what the /usr/sbin/service program runs? launchcode Red Hat 3 07-16-2004 02:18 PM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-08-2004 12:11 AM
Program runs when a user logs in mindstormsguy Linux - Software 2 03-31-2004 06:01 PM
Every OpenGL program runs VERY slow!!! adas Linux - General 6 10-10-2002 07:05 PM


All times are GMT -5. The time now is 01:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration