Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

acl_get_perm(3) [redhat man page]

ACL_GET_PERM(3) 					   BSD Library Functions Manual 					   ACL_GET_PERM(3)

NAME
acl_get_perm -- test for a permission in an ACL permission set LIBRARY
Linux Access Control Lists library (libacl, -lacl). SYNOPSIS
#include <sys/types.h> #include <acl/libacl.h> int acl_get_perm(acl_permset_t permset_d, acl_perm_t perm); DESCRIPTION
The acl_get_perm() function tests if the permission specified by the argument perm is contained in the ACL permission set pointed to by the argument permset_d. Any existing descriptors that refer to permset_d continue to refer to that permission set. RETURN VALUE
If successful, the acl_get_perm() function returns 1 if the permission specified by perm is contained in the ACL permission set permset_d, and 0 if the permission is not contained in the permission set. Otherwise, the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
If any of the following conditions occur, the acl_get_perm() function returns -1 and sets errno to the corresponding value: [EINVAL] The argument permset_d is not a valid descriptor for a permission set within an ACL entry. The argument perm is not a valid acl_perm_t value. STANDARDS
This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 ("POSIX.1e", aban- doned). SEE ALSO
acl_add_perm(3), acl_clear_perms(3), acl_delete_perm(3), acl_get_permset(3), acl_set_permset(3), acl(5) AUTHOR
Written by Andreas Gruenbacher <a.gruenbacher@computer.org>. Linux ACL March 23, 2002 Linux ACL

Check Out this Related Man Page

ACL_GET_PERM(3) 					   BSD Library Functions Manual 					   ACL_GET_PERM(3)

NAME
acl_get_perm -- test for a permission in an ACL permission set LIBRARY
Linux Access Control Lists library (libacl, -lacl). SYNOPSIS
#include <sys/types.h> #include <acl/libacl.h> int acl_get_perm(acl_permset_t permset_d, acl_perm_t perm); DESCRIPTION
The acl_get_perm() function tests if the permission specified by the argument perm is contained in the ACL permission set pointed to by the argument permset_d. Any existing descriptors that refer to permset_d continue to refer to that permission set. RETURN VALUE
If successful, the acl_get_perm() function returns 1 if the permission specified by perm is contained in the ACL permission set permset_d, and 0 if the permission is not contained in the permission set. Otherwise, the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
If any of the following conditions occur, the acl_get_perm() function returns -1 and sets errno to the corresponding value: [EINVAL] The argument permset_d is not a valid descriptor for a permission set within an ACL entry. The argument perm is not a valid acl_perm_t value. STANDARDS
This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 ("POSIX.1e", aban- doned). SEE ALSO
acl_add_perm(3), acl_clear_perms(3), acl_delete_perm(3), acl_get_permset(3), acl_set_permset(3), acl(5) AUTHOR
Written by Andreas Gruenbacher <a.gruenbacher@bestbits.at>. Linux ACL March 23, 2002 Linux ACL
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find

Can anybody please tell me what in the world this command does? find /home -mount \( -perm -4000 -o -perm -2000 -o -perm -2 \) -a \( -type f -o -type d \) -exec ls -lLabd {} \; 2> /dev/null This is a SCO Unixware machine (3 Replies)
Discussion started by: jscudder
3 Replies

2. Shell Programming and Scripting

perm bits

hi, in other previous post, someone suggested to set the " perm bits " to lock the file such that preventing others write to that same file, could someone please explain exactly what is perm bits and how can I achieve the desired result? Thanks! (1 Reply)
Discussion started by: mpang_
1 Replies

3. UNIX for Dummies Questions & Answers

Reading Files

Hi I need to perform certain tests on information contained in a file, a lot of what is contained in the file is duplicate data, so what I want to do as it is a failrly substantial file size is to start and finish reading from a specifed line in the file. Can someone tell me how to indicate... (3 Replies)
Discussion started by: oop
3 Replies

4. UNIX for Dummies Questions & Answers

Executing file without excute permission.

Hi, I have a file which don't have execute permission, but still it can be executed by "sh" like as below. ------------------------------------------------------------------ -rw-r----- 1 root other 30 May 8 15:43 test.sh (svpkg1-nd:root) - ./test.sh ./test.sh: cannot execute... (4 Replies)
Discussion started by: ashish_uiit
4 Replies

5. Shell Programming and Scripting

touch and permission

Hi All, I have requirement to give permission to empty file. I do it in two steps. But is it possible using touch command with some option for providing permission for a file. Regards, gehlnar (3 Replies)
Discussion started by: gehlnar
3 Replies

6. UNIX for Dummies Questions & Answers

Permission

Hello Whenever we want to oen any type of file by name, we must have execute perm. in each dir. mentioned in the name. I changed the dir permission using chmod to test the validity of this statement. but i still can open the file ------- any guides would be appreciable (2 Replies)
Discussion started by: dr_mabuse
2 Replies

7. Shell Programming and Scripting

what does "s" stand for in the permission list -rwsr-sr-x?

-rwsr-sr-x I have a permission like this. What does s stand for and how do we represent this in numbers? like 755, 744 etc., (2 Replies)
Discussion started by: sagar_evc
2 Replies

8. Shell Programming and Scripting

Re-apply the file permission

Hi, I having an issue with file permission. To fix it I need to read the file's existing permission and re-apply the same permission to the file. This has to be done for every single file under a mount point. I'm novice in scripting. Help me with this in shell scripting. # ls -l /dev/null... (10 Replies)
Discussion started by: agent001
10 Replies

9. UNIX for Dummies Questions & Answers

permission question

Hi, On the Redhat ES, when I do ls -l I see dot (.) after the permission. I never saw on other UNIX systems. Is that some thing new RH 6? -rw-r--r--. <---- this dot, I am referring to -rw-r--r--. 1 root root 18 May 20 2009 .bash_logout -rw-r--r--. 1 root root 176 May 20 ... (1 Reply)
Discussion started by: samnyc
1 Replies

10. Shell Programming and Scripting

search any user files with write permission

Guys, i wanna get any user files with write permission (on user or group permission) for review but i confuse with -perm parameter. any body can help me to explain what is that mean? thank's (1 Reply)
Discussion started by: michlix
1 Replies

11. UNIX for Dummies Questions & Answers

How to find out who changed the file permission in unix

Can any one tell me is there any command to find out who changed the permission of a file Or is there any log file so that i can find out who has changed the permission of a file? Thanks in Advance:) (7 Replies)
Discussion started by: Uttamnsd
7 Replies

12. Shell Programming and Scripting

Apply file permission

Hi All, I would like to read the permission from a file and wanted to apply the same permission to another file. say for example, f1 755 first...i have to read the permission type (which is differ for each file) and need to apply the same for f2 a1 666 i have to get this... (5 Replies)
Discussion started by: karthi_mrkg
5 Replies

13. AIX

Syslogs permission not getting changed - aix 6.1

Friends, I've tried to modify the syslogs permission by using the perm option in the syslog configuration in AIX 6.1 TL 05. But its not getting applied after the configuration. Have restarted the syslog service also. Need your help!:wall: The below are the conf details and os versions >... (1 Reply)
Discussion started by: novaothers
1 Replies

14. Programming

JAVA code to create file in Linux with specific permission

Hi All, I'm looking for JAVA code to create file in Linux with specific permission File should be created and saved in Linux in this path \opt\sys\doc by Java with this permission 764 Anyone can help to provide this Java code (3 Replies)
Discussion started by: AbuAliiiiiiiiii
3 Replies