Solved

User permissions and rights on centos

Posted on 2009-05-06
6
2,429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 29

Expert Comment

by:fosiul01
ID: 24313203
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
ID: 24313208
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
ID: 24313214
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:Hekkro
ID: 24313273
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
ID: 24313678

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:Monis Monther
ID: 24313932
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
When you’re making plans to join the modern business race, you should analyze various details that may affect your results. Nowadays, millions of businesses are trying to grow into established and appreciated professional enterprises.

739 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