Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Question about UNIX file rights Post 302799871 by mike_bn on Sunday 28th of April 2013 05:46:22 AM
Old 04-28-2013
Well, my reply to your last post was not accepted and has to be approved by the moderators
first. All i did is thank you for helping me out, so thanks again!
mike_bn
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File Oput question in Unix?

Just curious in Unix BSD lpr customer would result in the printing of the file customers to a printer but I also came across this command pr| customer| lpr which suppose to prepare the file by formatting before printing. My question is what type of formatting is done to the file for example what... (1 Reply)
Discussion started by: wmosley2
1 Replies

2. SuSE

UNIX - Linux NFS Rights need Help

Hello, I am running a Suse Linux server and I want to set up a NFS Server for a few Unix machines. For the root account at the unix client it works fine but it doesn't work for other users who have no root rights. I've used the no_root_squash and the rw option in the etc/export file. My folder... (7 Replies)
Discussion started by: Ald-Edv
7 Replies

3. UNIX for Dummies Questions & Answers

Unix access rights

Hi, Is it true that if I am not the root I can not select access permissions to a file that I own so that my friend (who also isn't the root) can access that file? And is it true that the only way to accomplish it is to ask the root to "put" my friend into "my" group? Then I could simply set... (1 Reply)
Discussion started by: rudo
1 Replies

4. UNIX for Dummies Questions & Answers

file access rights?

Hi, I want to execute a customised process like rating engine using a shell script from a directory other than the directory where the customizes process is placed. I have tried it in the following way...and faced a issue when shell script is available in directory /dir1/ and customized... (1 Reply)
Discussion started by: vkishore.btw
1 Replies

5. UNIX for Dummies Questions & Answers

question about unix file system

Hi, The file system unix use a multilevel indexes access to disk, 12 direct blocks, 1 single indirect block, 1 double indirect block, 1 triple indirect block: Assuming a: block = 512 bytes, pointer = 4 byte, and there is a file of 200 blocks, how many disk access is needed to read the block... (1 Reply)
Discussion started by: blob84
1 Replies

6. Solaris

New user question regarding admin rights

I'm trying to install OpenOffice on Solaris 11 but when I click on the setup icon I get an error message telling me that I need to have admin rights. I've tried logging on as SU or ROOT but cannot. I don't see how to grant myself admin rights. How is it done ? I know there are many many... (7 Replies)
Discussion started by: stansaraczewski
7 Replies

7. Shell Programming and Scripting

Management application user rights on the files in a Unix / Linux

good evening .. I have a plea, who I can help me with a management application user rights on the files in a Unix / Linux I need for college .. .. and not told us no clue .. thank you (1 Reply)
Discussion started by: alex90
1 Replies

8. Shell Programming and Scripting

Convert UNIX rights in a number in a sh script

Hello, i'm trying to write a script sh to convert the rights of a folder or file in a number. Explain: ls -l = rwxrwxrwx so i must display 777. Do you known where i can find so convert script Thanks Use code tags, thanks. (11 Replies)
Discussion started by: steiner
11 Replies
CAP_RIGHTS_INIT(3)					   BSD Library Functions Manual 					CAP_RIGHTS_INIT(3)

NAME
cap_rights_init, cap_rights_set, cap_rights_clear, cap_rights_is_set, cap_rights_is_valid, cap_rights_merge, cap_rights_remove, cap_rights_contains -- manage cap_rights_t structure LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/capsicum.h> cap_rights_t * cap_rights_init(cap_rights_t *rights, ...); cap_rights_t * cap_rights_set(cap_rights_t *rights, ...); cap_rights_t * cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); cap_rights_t * cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); cap_rights_t * cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); DESCRIPTION
The functions documented here allow to manage the cap_rights_t structure. Capability rights should be separated with comma when passed to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions. For example: cap_rights_set(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT, CAP_SEEK); The complete list of the capability rights can be found in the rights(4) manual page. The cap_rights_init() function initialize provided cap_rights_t structure. Only properly initialized structure can be passed to the remain- ing functions. For convenience the structure can be filled with capability rights instead of calling the cap_rights_set() function later. For even more convenience pointer to the given structure is returned, so it can be directly passed to cap_rights_limit(2): cap_rights_t rights; if (cap_rights_limit(fd, cap_rights_init(&rights, CAP_READ, CAP_WRITE)) < 0) err(1, "Unable to limit capability rights"); The cap_rights_set() function adds the given capability rights to the given cap_rights_t structure. The cap_rights_clear() function removes the given capability rights from the given cap_rights_t structure. The cap_rights_is_set() function checks if all the given capability rights are set for the given cap_rights_t structure. The cap_rights_is_valid() function verifies if the given cap_rights_t structure is valid. The cap_rights_merge() function merges all capability rights present in the src structure into the dst structure. The cap_rights_remove() function removes all capability rights present in the src structure from the dst structure. The cap_rights_contains() function checks if the big structure contains all capability rights present in the little structure. RETURN VALUES
The functions never fail. In case an invalid capability right or an invalid cap_rights_t structure is given as an argument, the program will be aborted. The cap_rights_init(), cap_rights_set() and cap_rights_clear() functions return pointer to the cap_rights_t structure given in the rights argument. The cap_rights_merge() and cap_rights_remove() functions return pointer to the cap_rights_t structure given in the dst argument. The cap_rights_is_set() returns true if all the given capability rights are set in the rights argument. The cap_rights_is_valid() function performs various checks to see if the given cap_rights_t structure is valid and returns true if it is. The cap_rights_contains() function returns true if all capability rights set in the little structure are also present in the big structure. EXAMPLES
The following example demonstrates how to prepare a cap_rights_t structure to be passed to the cap_rights_limit(2) system call. cap_rights_t rights; int fd; fd = open("/tmp/foo", O_RDWR); if (fd < 0) err(1, "open() failed"); cap_rights_init(&rights, CAP_FSTAT, CAP_READ); if (allow_write_and_seek) cap_rights_set(&rights, CAP_WRITE, CAP_SEEK); if (dont_allow_seek) cap_rights_clear(&rights, CAP_SEEK); if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) err(1, "cap_rights_limit() failed"); SEE ALSO
cap_rights_limit(2), open(2), capsicum(4), rights(4) HISTORY
Support for capabilities and capabilities mode was developed as part of the TrustedBSD Project. AUTHORS
This family of functions was created by Pawel Jakub Dawidek <pawel@dawidek.net> under sponsorship from the FreeBSD Foundation. BSD
March 27, 2014 BSD
All times are GMT -4. The time now is 02:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy