Solved

User permissions and rights on centos

Posted on 2009-05-06
6
2,423 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
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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:small_student
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Agile and Scrum have almost become synonymous. Have you wondered what's the difference? Scrum is just one way to be Agile. It is the most popular which leads to the common confusion. Agile actually refers to a philosophy shared by group of developme…
You can provide a virtual interface for remote stakeholders in a SWOT analysis through a Google Drawing template. By making real time viewing and collaboration possible, your team can build a stronger product.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

920 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

15 Experts available now in Live!

Get 1:1 Help Now