Link to home
Start Free TrialLog in
Avatar of undy30
undy30

asked on

Easy - How to change user permissions

Vanilla Debian Install:
Should be very simple. How do I change user permissions?
I know chmod and chown.
You can give user,rights, and other permissions.
How do I specify the actual user that is getting the rights, or the actual group?
In windows you say you want a specific user to have specific rights.

I can type chmod u+w file.txt and that will give write access to the user....which user? The user thats logged in? That's root then.

My problem is I have a webserver, apache. I need to secure all web files but make it so only the root and the user 'ftp' can have full and total access to them.

I did some playing around and probably screwed up the files, so to redo it would be the best.

chmod ugo-rwx /var/backhand/htdocs would take away all access right?
Then I should build up from there to do it correctly. The webuser (www) should have read access, right?, and the root/ftp user should have god rights. I have searched and searched, i think its the concept I don't have.

No one logs into this box besides me with root, i know its bad, and ftp with a client, and www from the internet.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of undy30
undy30

ASKER

Ok. So that works. But what if I add another use who wants to do updates later?
Would I make them the owner and then change the rights? Or would I be forced to make a group  and assign them the group rights?

Also I have many folders, how can I chown them all at once.
I do chown ftp /var/backhand/* and it works, but it doesn't flow down through each folder.
There can only be one owner of a file system object. To have multiple users be able to write/delete files you'd want both users to be in the same group and give group write perms (chmod g+w).

chmod, chown, and chgrp can do recursive options, like 'chgrp -R ...'