Sponsored Content
Top Forums Shell Programming and Scripting Special group & user privileges Post 302466991 by LibRid on Thursday 28th of October 2010 01:18:58 AM
Old 10-28-2010
Special group & user privileges

Special group and user privileges help

I'm having some trouble understanding the group and user privileges.

So let's say I make a group.. and assign some users to the groups that I made.
How would I --
1) Allow different groups and different users to have full privileges over a file with .X extension
ex. I want user John to be able to read write execute files that end in .dat
ex. I want group Moderators to be able to read write execute files that end in .sh

2) Ban or block certain file names no matter the extension from said user.
ex. I want to ban Harry from any file that has the word MySQL in it



I'm almost certain this has something to do with chmod, but i'm not sure how I can edit permissions to a specific user/group to a file extension or file name.

I know each number in chmod corresponds to OWNER, GROUP, WORLD
But how would I specify what group or person?

I hope you understand what help I'm asking, and I appreciate all your help as always!


Thank you!


EDIT: Now that I think about it.. i would need to use a regular expression to specify what file name or extension, right?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Root privileges &Sudoer

Hi guys... how can a root assign a user all or most of the root privileges? is sudoer comand enough 4 this? thx alot.. (2 Replies)
Discussion started by: blue_7
2 Replies

2. UNIX for Advanced & Expert Users

Can't use sendmail ( Program mode requires special privileges)

I just updated sendmail to the newest version and got into this trouble. Somehow only can root can use sendmail while the other users will simply get "SMTP went away" when using pine or "can not chdir(/var/spool/mqueue/): Permission denied Program mode requires special privileges, e.g., root... (1 Reply)
Discussion started by: Micz
1 Replies

3. UNIX for Dummies Questions & Answers

group & user permission question

Folks; I'd like to create a group on my Linux box & add a few users to it. Is there a way to do so and restrict this group/users to have access to only one or directory trees? Let's say i need this group to only have a read write access to only these two directories /opt/Virtu & /fsn/comers ... (10 Replies)
Discussion started by: Katkota
10 Replies

4. UNIX for Dummies Questions & Answers

user & group read/write access question

folks; I created a new users on my SUSE box and i need to give this user/group a read write access to one specific folder. here's the details: - I created new user "funny" under group "users". - I need to give this user "funny" a read/write access to another directory that is owned by "root".... (3 Replies)
Discussion started by: Katkota
3 Replies

5. Shell Programming and Scripting

How can i copy user permissions(privileges) to a group

Hey there I have a problem and i was hoping that you guys could help me out I want to copy a user privileges to a group and i need to copy all privileges(Recursively) every directory with all its sub directories and I tried some solution and it did not work. I used the following command:- ... (14 Replies)
Discussion started by: The Dark Knight
14 Replies

6. Ubuntu

Create New User with the same group nd privileges of the other user

Hi, Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01". I want both in the sames privileges and group. Please see the existing users list below; drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies

7. Shell Programming and Scripting

New To UNIX - Need Script to create report of user & group accounts

Hi, I'm new to the world of UNIX and have been asked to create a complex script (at least complex to me:confused:) for AIX UNIX to create a report of all the users on the server including server, user, UID, groups, GID, etc. Found a script using lsuser, but the output is still lacking. 2 things I... (2 Replies)
Discussion started by: panthur
2 Replies

8. Solaris

Sudo Privileges & Sudoers Group

I'm looking for some suggestions to accomplish what a specific user needs, without adding them to the "sudoers" group. I have X user, that is requesting to be able to change file permissions on items owned by others and search directories where X user doesn't have access. I'm open to any... (2 Replies)
Discussion started by: Nvizn
2 Replies

9. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies

10. AIX

UID & GID instead of user name and group name

Hi Everyone, We are encountering the following issue on AIX 5.3. When we do ls -ltr the list displays only user id and group id instead of user name and group name. This is happening for all users except root. Whe we do ls -ltr with root user it shows perfectly fine. When we searched... (25 Replies)
Discussion started by: madhav.kunapa
25 Replies
getprivgrp(2)							System Calls Manual						     getprivgrp(2)

NAME
getprivgrp(), setprivgrp() - get and set special attributes for group SYNOPSIS
DESCRIPTION
getprivgrp() The system call returns a table of the privileged group assignments into a user-supplied structure. grplist points to an array of struc- tures of type associating a group ID with a privilege mask. Privilege masks are formed by ORing together elements from the access types specified in The array may have gaps in it, distinguished as having a field value of The group number gives the global privilege mask. Only information about groups which are in the user's group access list, or about the user's real or effective group ID, is returned to an ordinary user. The complete set is returned to a user with the privilege. setprivgrp() The system call associates a kernel capability with a group ID. This allows subletting of superuser-like privileges to members of a par- ticular group or groups. takes two arguments: grpid, the integer group ID, and mask, a mask of permissions. The mask is created by treat- ing the access types defined in as bit numbers (using 1 for the least significant bit). Thus, privilege number 5 would be represented by the bits or 16. More generally, privilege p is represented by: where is given 8 bits per byte. As it is possible to have more than word-size distinct privileges, mask is a pointer to an integer array of size privileges include those specified in the file A process can access the system call protected by a specific privileged group if it belongs to or has an effective group ID of a group having access to the system call. All processes are considered to belong to the pseudo-group Specifying a grpid of causes privileges to be revoked on all privileged groups that have any of the privileges specified in mask. Specify- ing a grpid of causes privileges to be granted to all processes. The constant in defines the system limit on the number of groups that can be assigned privileges. One of these is always the psuedo-group allowing for actual groups. Only processes with the privilege can use Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
and return the following values: Successful completion. Failure. is set to indicate the error. ERRORS
If fails, is set to one of the following values. grplist points to an illegal address. The reliable detection of this error is implementation dependent. If fails, is set to one of the following values. The request would require assigning privileges to more than groups. mask points to an illegal address. The reliable detection of this error is implementation dependent. mask has bits set for one or more unknown privileges. grpid is out of range. The caller is not a privileged user. EXAMPLES
The following example prints out and the group IDs of the privilege groups to which the user belongs: AUTHOR
and were developed by HP. SEE ALSO
getprivgrp(1), setprivgrp(1M), setgroups(2), privgrp(4), privileges(5). getprivgrp(2)
All times are GMT -4. The time now is 08:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy