Solved

Restrict access to file for a particular user

Posted on 2002-05-13
9
231 Views
Last Modified: 2013-12-27
can anyone tell me how do we grant a particular privilege(read or write or execute) on a particular file to a particular user ?!!!.

0
Comment
Question by:srinusimhadri
  • 5
  • 4
9 Comments
 
LVL 2

Expert Comment

by:jonke
ID: 7006133
If you are looking for setting up basic permissions, then you need to set file ownership and permissions using chmod, chown and chgrp.

If you wish to give a user permissions on a file other than the owner of the file e.g. other than the standard unix user:group:other style permissions, u need to use acl's. You need to setup a maximum permission allowed under acl control e.g.

setfacl -m mask:rwx afile

Would allow an acl to give a user full control over that file even if given the standard unix file permissions they would normally be just classed as other. Then to give a specific user permissions on a file, you would use:

setfacl -m user:<username>:rwx afile

So it depends whether it is standard unix file permissions or acl's you require.
0
 

Author Comment

by:srinusimhadri
ID: 7006289
So, that means acls are not standard.
what do u mean by not being standard ?
do u mean I need to install/compile additional components into unix kernel ?
ro
do u mean its already a basic feature, but no one wants to use ?
or
the acls are not part of original ? (why was it like that ?!!!)

What will the overhead if I use acls ?

Please advise.
0
 
LVL 2

Expert Comment

by:jonke
ID: 7006364
I don't mean anything much by ACL's not being standard - just they do not get used a huge amount as for the majority of siutations, the user/group/other style of unix file permissions is enough..

ACL's have been created to give an extra level of granularity to file permissions if required.

They are a standard part of Solaris.

The downside of using ACL's is that there is a slight extra administrative overhead.

There are no performance hits or anything like that associated with using ACL's.
0
 

Author Comment

by:srinusimhadri
ID: 7006383
great.
Just wanted to know, how often acls are used in production environments.
seems to be that, mostly no one is using them (being unpopular yet, atleast with me).

it means,
If I go ahead with using acls, I might be doing something which industry not really practicing much.

Please comment.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:srinusimhadri
ID: 7006398
I was creating some files.
Suddenly I realised that I need to assign the write permission to a particulary user,
and browsed through documentations, but could only find the commands for assigning standard way of rights, and not the acls.


I am thinking shall I proceed with assigning that one privilege to one user on that one file !!! (in such a big production system)
0
 
LVL 2

Expert Comment

by:jonke
ID: 7006403
You should have no problem implementing ACL's in a production environment - they are a totally tried and tested part of Solaris, and have been in it as long as I have been working with it so should be no problem.

In what circumstances would you be using them? Would you have to create a lot of different permissions for a lot of different users? Or is it just a particular user you wish to allow permission to a particular file?

0
 

Author Comment

by:srinusimhadri
ID: 7006408
I am just one user out of lot of users using that system.
And I am not sure how they are doing.
0
 
LVL 2

Accepted Solution

by:
jonke earned 200 total points
ID: 7008068
Well - if you wish to assign a write to a particular user for on file - then yes - I think you have answered your own question.

Remeber that ACL's don't override normal unix permissions, they just supplement them.

The important thing is if its a production environment - just be sure to adhere to all change control policies, and to document what you are doing so other people that access the system in the future know what you have done.

0
 

Author Comment

by:srinusimhadri
ID: 7008149
Thanks ionke.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

919 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

21 Experts available now in Live!

Get 1:1 Help Now