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