Posts: 226
Threads: 36
Joined: Oct 2008
Reputation:
0
When i early installed my server i used root to install it. Afterwards i have been thinking about security. And needs to change the user and chmod my dirs.
I know that i can use chown and chmod. But im unsertain how i should do my changes without beening forced to redo everything. How?
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
go to the directory where your server is installed and run:
Code:
chown <username>:users -R .
chmod u+rwX -R .
*****www.fpsmeter.org
*****wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Posts: 226
Threads: 36
Joined: Oct 2008
Reputation:
0
Should i run the server with the user that owns the files or should i have two users.
User 1. User owns the files
User 2. Runs the server (Can only write to logs, sprays, data)
Is this a good idea? And how will that affect autoupdating plugins?
Those plugins are usually written into plugins/disabled and then moved and writes over the previous ones.
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
I would recommend running under the user that owns the server files. I don't see big security issues there. But make sure the user cannot do much else...
*****www.fpsmeter.org
*****wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Posts: 3
Threads: 0
Joined: Jan 2010
Quote:chmod u+rwX -R .
I think it should be:
Quote:chmod u+rwx -R .
Linux is a case sensitive operating system.
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
(01-24-2010, 09:10 AM)HowieHjones Wrote: I think it should be:
no it shoudn't. a small x makes all files executable, that's not what you want. a big X makes only directories executable (so you can go into them) and files that already have one executable bit set. that's usually the wanted behavour.
*****www.fpsmeter.org
*****wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
(03-24-2010, 04:12 AM)lhffan Wrote: I would like to remove write acess to all folders and subfolders. And then afterwards allow write to only some neccesary dirs. But nothing happens.
what did you try?
removing all write access would be:
chmod ugo-r -R .
but beware that the owner of the files can changes that back...
*****www.fpsmeter.org
*****wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Posts: 226
Threads: 36
Joined: Oct 2008
Reputation:
0
03-24-2010, 09:02 AM
(This post was last modified: 03-24-2010, 09:06 AM by lhffan.)
Im the owner
il trye that one...
edit
You didnt mean
chmod ugo-w -R .