11-12-2003
For the task you are trying to accomplish, you should probably used extended ACL(s).
Give some directory named ick, before adding an additional ACL:
$ ls -ld ick
-rwx------ 1 kduffin sysadmin 328 Jun 25 15:53 ick
To add the ACL for a user named keith:
$ setfacl -m u:keith:rwx,m:rwx ick
You can tell that there is an ACL by the plus sign on the listing now:
$ ls -ld ick
-rwx------+ 1 kduffin sysadmin 328 Jun 25 15:53 ick
You can see the assigned ACL(s) using getfacl
$ getfacl ick
user::rwx
user:keith:rwx #effective:rwx
group::--- #effective:---
mask:---
other:---
Hope this helps. Anytime I add extended ACL(s), I will typically add them to a script as will (setperms) so that I can quickly reset ACL(s) in the event of file or directory removal.
Cheers,
Keith
Last edited by kduffin; 11-17-2003 at 10:49 PM..
10 More Discussions You Might Find Interesting
1. AIX
I'm trying to give a non-root user the right to start IBM HTTP Server, the web server is listening on port 80, but for AIX, ports under 1024 are privilege ports which can be used only by root.
/usr/IBMIHS/bin# ./apachectl start
(13)Permission denied: make_sock: could not bind to address :::80... (1 Reply)
Discussion started by: ibmer414
1 Replies
2. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
3. Solaris
Can anyone please tell how to give root privilege to a normal user in solaris 10? (5 Replies)
Discussion started by: nicktrix
5 Replies
4. UNIX for Dummies Questions & Answers
Hello experts I am new to Unix.
Env : HPUX
I need to create a user say testuser such that it does not have access to file/directories from the other group i.e the last 3 digits .
How do I do that.
Reason for such a request :-
I have an existing user oracle which has default umask... (3 Replies)
Discussion started by: simonsimon
3 Replies
5. Solaris
OS Version: Sun Solaris version 9
Other than root, we need operation to manage printer queue by using following command:
lprm -P
cancel
enable/disable
What privilege should be given?
Pls advise.
Thank you. (4 Replies)
Discussion started by: KhawHL
4 Replies
6. AIX
How to assign superuser privilege to an ordinary user temporarily (1 Reply)
Discussion started by: udtyuvaraj
1 Replies
7. AIX
I am planning to implement sudo for users.
Under , it looks I have to put the users who need to have sudo access:
What are the recommended for users? I don't think I need to give the ALL privilege (i.e ) to AIX users.
I'd like to know the commonly used privilege specification for sudo... (9 Replies)
Discussion started by: Daniel Gate
9 Replies
8. Cybersecurity
I am planning to implement sudo for users.
Under , it looks I have to put the users who need to have sudo access:
What are the recommended for users? I don't think I need to give the ALL privilege (i.e ) to AIX users.
I'd like to know the commonly used privilege specification for sudo... (1 Reply)
Discussion started by: Daniel Gate
1 Replies
9. Shell Programming and Scripting
Hi ,
I want to create 3 different user with below privilege in Solaris and Linux.
1) Read Only
2)Read and Write Only
3) Admin user
Can you guys help me on this . (3 Replies)
Discussion started by: Naveen Pathak
3 Replies
10. Solaris
Hi
I need to assign proc_owner privilege to particular user through RBAC. How can I assign this privilege to user, I need help on this.
Further I need to understand if I give this proc_owner privilege to particular user, what kind of control user will get on other user or system processes... (7 Replies)
Discussion started by: sb200
7 Replies
LEARN ABOUT DEBIAN
rfio_chmod
RFIO_CHMOD(3) Rfio Library Functions RFIO_CHMOD(3)
NAME
rfio_chmod, rfio_fchmod - change access mode of a directory/file
SYNOPSIS
#include <sys/types.h>
#include "rfio_api.h"
int rfio_chmod (const char *path, mode_t mode);
int rfio_fchmod (int s, mode_t mode);
DESCRIPTION
rfio_chmod sets the access permission portion of the mode of a directory/file to the bit pattern in mode.
rfio_fchmod is identical to rfio_chmod but works on the file descriptor s returned by rfio_open.
path specifies the logical pathname relative to the current directory or the full pathname.
mode is constructed by OR'ing the bits defined in <sys/stat.h> under Unix or "statbits.h" under Windows/NT:
S_IRUSR 0000400 read by owner
S_IWUSR 0000200 write by owner
S_IXUSR 0000100 execute/search by owner
S_IRGRP 0000040 read by group
S_IWGRP 0000020 write by group
S_IXGRP 0000010 execute/search by group
S_IROTH 0000004 read by others
S_IWOTH 0000002 write by others
S_IXOTH 0000001 execute/search by others
The effective user ID of the process must match the owner of the file or be super-user. If a directory is writable and has the sticky bit
set, files/directories within that directory can be removed or renamed only if:
the effective user ID of the requestor matches the owner ID of the file or
the effective user ID of the requestor matches the owner ID of the directory or
the file is writable by the requestor or
the requestor is super-user.
RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.
ERRORS
EPERM The effective user ID does not match the owner of the file and is not super-user.
ENOENT The named file/directory does not exist or is a null pathname.
EBADF s is not a valid file descriptor.
EACCES Search permission is denied on a component of the path prefix or write permission on the file itself is denied.
EFAULT path is a NULL pointer.
ENOTDIR A component of path prefix is not a directory.
ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN.
SENOSHOST Host unknown.
SENOSSERV Service unknown.
SECOMERR Communication error.
SEE ALSO
Castor_limits(4)
AUTHOR
LCG Grid Deployment Team
LCG
$Date: 2005/03/31 13:13:02 $ RFIO_CHMOD(3)