Solved

User permissions and rights on centos

Posted on 2009-05-06
6
2,422 Views
Last Modified: 2013-11-25
How can I give an user the right to change file/folders' permissions and/or ownerships via console on CentOs 5.2





0
Comment
Question by:Hekkro
6 Comments
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
you need to make the user owner of that file

to make the owner :

use chown

chown -R user  foldername   [ here -R for recursive ]

it wil change the owner ship

then give the read and write permision over that folder or file

by chmod  -R 755 folder name


http://www.cyberciti.biz/faq/how-linux-file-permissions-work/   : file permission  
0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
how to use chown command to change owner shop

http://www.cyberciti.biz/faq/how-to-use-chmod-and-chown-command/  



you can use chgrp commadn to change group owner ship,

0
 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
sorry too much link , but just have a read

http://www.tuxfiles.org/linuxhelp/fileowner.html

for chown and chgrp for changing file permission
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:Hekkro
Comment Utility
Isn't there another way to do it

I'm giving someone access to my webserver, so he can fix some stuff ...I don't think is safe to make him the owner of the whole website.

Maybe create a "support" group with these rights and add this user to this group?

but then again I don't know much about it
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 125 total points
Comment Utility

Hi,

how about sudo?

With sudo you can allow execution of only the commands that are really needed (with the privileges of any user you define, including root), you can revoke privileges easily, and you can have a log of anything the user does with sudo.

Look at 'man sudo', 'man sudoers', 'man visudo'  to learn more.

wmp
0
 
LVL 14

Expert Comment

by:small_student
Comment Utility
Why not use ACLs

By using ACLs you can give someone specific permissions regardless of Owner,Group and others

for example you can give Mr. Fix   rwx excusivly for Dirs or Files you want

To implement acls its fairly easy

setfacl -m u:john:rwx /var/www/html/test

This would give user John rwx on the file test without changing anything with chmod or owner or group
Do man setfacl and check examples at the end of the page

To view acl on a file

getfacl filename

Good Luck
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Online collaboration can help businesses be more efficient, help employees grow their skills and foster a team environment.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now