Click to See Complete Forum and Search --> : Chmod question
pix31
07-20-2004, 05:14 AM
Ok this is sort of related to security, i messed up when i first started tooling with linux and ran everything as root. Now i have seperate users to handled each fo the jobs.
Whats the best way to chmod or chown everything so its not root? Thanks in adavnce!
Dark Ninja
07-20-2004, 09:38 AM
Well, that depends on how you set everything up. Without looking at your system, I'd say, chances are, your system is probably pretty okay to begin with. It is not recommended that you run programs as root, but, you need to be root to install programs/edit files/etc.
The only thing that may change in this whole mess, is any "common" files that are not system critical. (For example: /etc/passwd should *only* belong to root and should only be writable by root.)
I really don't think you have anything to worry about, but if you want to chmod, go here...
http://catcode.com/teachmod/
If you want to learn about chown, go here:
http://www.mkssoftware.com/docs/man1/chown.1.asp
Also, you can always type the command:
man chmod
man chown
to learn about these two commands.
bradfordgd
07-20-2004, 10:24 AM
chown -R user file_name
chgrp -R group file_name
will change the directory or filename you specify and all subfolders and files under them to the user or group you specify.
pix31
07-20-2004, 03:57 PM
Yes i know abit about these commands and i have used them. My problem is how do i chmod or chown alot of files at once.
For those of you know that know about it, im running a HLDS server, and i sued to run that as root. I also used to run a few scripts that handle stuff with the site, as root. I would like to change that so my staff acan login and move around stuff when needed. Since everything is root, they cant. Also i heard its very unsecure to run HLDS as root.
Brian
It depends on what you need to chmod...
If you want to chmod all the stuff in a dir then you can do chmod permission dir/*, maybe if you want to chmod just a few files you can do chmod permission file1 file2 file3
If you need to change the permissions of a dir and its contents (including dirs) then you have to use the -R option.