Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Unix permissions for a newbie Post 302084119 by RTM on Wednesday 9th of August 2006 09:33:26 AM
Old 08-09-2006
1) Is it possible to retrieve a list of user(ID) file permissions?

See the man page for the find command
$ find . -user username -ls
username can be either a username or a numeric user ID.



2) What is the most efficient way to create an alert/error message when/if those file permissions are denied?

The system will provide a error message - what more do you want?
$ls -l /var/adm/sulog
-rw------- 1 root root 71386 Aug 1 12:00 /var/adm/sulog
$ cat /var/adm/sulog
/var/adm/sulog: Permission denied
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix newbie

What shellscript would I use If I wanted to list all files in the current directory which are identical to a certain filename. I am told to use binary comparison but have been unable to find out what this means. I have tried man pages and can find a file of a certian filename but cant seem to... (1 Reply)
Discussion started by: gavinlow1980
1 Replies

2. UNIX for Dummies Questions & Answers

Newbie to Unix

Hey, I've been a windows guy all my life, but i have finally decided to move to Unix and buy a Mac. I am pretty good with a lot of programming applications on windows, but was wondering if u guys had any advice on how to get started on Unix, like books to read, applications to buy, websites,... (8 Replies)
Discussion started by: Mafia
8 Replies

3. Shell Programming and Scripting

Newbie to HP Unix

Hi Im a newbie to unix having been a windows guy, yes I know a swear word on here ? but part of my new job is to be trained up on Unix. On the course we were set a task to read a file that has dates times codes etc, a log file. see below as an example 2007/02/19 00:00:06: Information: Switch... (3 Replies)
Discussion started by: MyNameisEarl
3 Replies

4. Ubuntu

Newbie, Directories permissions

Basicly im trying to edit a file for apache2 in /var/etc/apache2 and i dont have permissions, my login name is associated with root but i still can't do anything, Does anyone have any ideas? Thanks in advance! (3 Replies)
Discussion started by: sypherz
3 Replies

5. Shell Programming and Scripting

Can we call JSP file from Unix.if so how.Please help me.Im newbie to Unix

Hi Can we call a jsp page from Unix.if so please let me know how we can.. thanks for the help in advance... thanks kumar (0 Replies)
Discussion started by: mailsukumar
0 Replies

6. UNIX for Dummies Questions & Answers

I'm a newbie to unix

i have just installed UNIX 7.01 to replace a windows server2003 used for my family to share and remotely save photos i need to set it up so very novice users can view, import and export photos most of the remote users will have windows machines,i use Linux, Mac and windows. most of what i want... (2 Replies)
Discussion started by: chance63
2 Replies

7. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

8. UNIX for Dummies Questions & Answers

newbie in unix

hiii i have few questions..i hav just started using unix....i got two doubts or problems as per now, if anyone can clarify it or solve it, his/her help is highly appreciated.. 1) how to Rename all files which contain the sub-string 'foo', replacing it with 'bar' within a given folder. 2)How to... (1 Reply)
Discussion started by: vicky1989
1 Replies

9. UNIX Desktop Questions & Answers

unix newbie

Hi everyone! Thanks for taking the time. I've installed redhat and ubunto on vmware virtually. I want to try unix and I tried to look in the internet but wasn't able to accomplish my desire task. Any links for install, download links and information will be honestly appreciated. I will be... (6 Replies)
Discussion started by: michaelttkk
6 Replies

10. UNIX for Dummies Questions & Answers

Help for Unix Newbie

Hi all, 1. How are we going to call .cmd files which is in window under Unix Environment? 2. Is there any equivalent command in Unix for "start" which is available in Windosw? Thx very much. (5 Replies)
Discussion started by: jessy83
5 Replies
ARCHIVE_ENTRY_ACL(3)					   BSD Library Functions Manual 				      ARCHIVE_ENTRY_ACL(3)

NAME
archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_next, archive_entry_acl_next_w, archive_entry_acl_reset, archive_entry_acl_text_w -- functions for manipulating Access Control Lists in archive entry descriptions LIBRARY
Streaming Archive Library (libarchive, -larchive) SYNOPSIS
#include <archive_entry.h> void archive_entry_acl_add_entry(struct archive_entry *a, int type, int permset, int tag, int qualifier, const char *name); void archive_entry_acl_add_entry_w(struct archive_entry *a, int type, int permset, int tag, int qualifier, const wchar_t *name); void archive_entry_acl_clear(struct archive_entry *a); int archive_entry_acl_count(struct archive_entry *a, int type); int archive_entry_acl_next(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const char **ret_name); int archive_entry_acl_next_w(struct archive_entry *a, int type, int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, const wchar_t **ret_name); int archive_entry_acl_reset(struct archive_entry *a, int type); const wchar_t * archive_entry_acl_text_w(struct archive_entry *a, int flags); DESCRIPTION
An ``Access Control List'' is a generalisation of the classic Unix permission system. The ACL interface of libarchive is derived from the POSIX.1e draft, but restricted to simplify dealing with practical implementations in various Operating Systems and archive formats. An ACL consists of a number of independent entries. Each entry specifies the permission set as bitmask of basic permissions. Valid permis- sions are: ARCHIVE_ENTRY_ACL_EXECUTE ARCHIVE_ENTRY_ACL_WRITE ARCHIVE_ENTRY_ACL_READ The permissions correspond to the normal Unix permissions. The tag specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. ARCHIVE_ENTRY_ACL_GROUP The group specied by the name field. ARCHIVE_ENTRY_ACL_GROUP_OBJ The group who owns the file. ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be obtained via group permissions. ARCHIVE_ENTRY_ACL_OTHER Any principal who doesn't have a user or group entry. The principals ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This specifies the permissions required for access to the file itself. Direc- tories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial access ACL for newly created directory entries. archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions are updated. archive_entry_acl_clear() removes all ACL entries and resets the enumeration pointer. archive_entry_acl_count() counts the ACL entries that have the given type mask. type can be the bitwise-or of ARCHIVE_ENTRY_ACL_TYPE_ACCESS and ARCHIVE_ENTRY_ACL_TYPE_DEFAULT. If ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non-extened ACLs are added. archive_entry_acl_next() and archive_entry_acl_next_w() return the next entry of the ACL list. This functions may only be called after archive_entry_acl_reset() has indicated the presence of extended ACL entries. archive_entry_acl_reset() prepare reading the list of ACL entries with archive_entry_acl_next() or archive_entry_acl_next_w(). The function returns either 0, if no non-extended ACLs are found. In this case, the access permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function returns the same value as archive_entry_acl_count(). archive_entry_acl_text_w() converts the ACL entries for the given type mask into a wide string. In addition to the normal type flags, ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID and ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT can be specified to further customize the result. The returned long string is valid until the next call to archive_entry_acl_clear(), archive_entry_acl_add_entry(), archive_entry_acl_add_entry_w() or archive_entry_acl_text_w(). RETURN VALUES
archive_entry_acl_count() and archive_entry_acl_reset() returns the number of ACL entries that match the given type mask. If the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. archive_entry_acl_next() and archive_entry_acl_next_w() return ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if archive_entry_acl_reset() has not been called first. archive_entry_text_w() returns a wide string representation of the ACL entrise matching the given type mask. The returned long string is valid until the next call to archive_entry_acl_clear(), archive_entry_acl_add_entry(), archive_entry_acl_add_entry_w() or archive_entry_acl_text_w(). SEE ALSO
archive(3), archive_entry(3) BUGS
ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID and ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT are not documented. BSD
February 2, 2012 BSD
All times are GMT -4. The time now is 06:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy