Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xattr_get(3) [php man page]

XATTR_GET(3)								 1							      XATTR_GET(3)

xattr_get - Get an extended attribute

SYNOPSIS
string xattr_get (string $filename, string $name, [int $flags]) DESCRIPTION
This function gets the value of an extended attribute of a file. Extended attributes have two different namespaces: user and root. The user namespace is available to all users, while the root namespace is available only to users with root privileges. xattr operates on the user namespace by default, but this can be changed with the $flags parameter. PARAMETERS
o $filename - The file from which we get the attribute. o $name - The name of the attribute. o $flags - Supported xattr flags +-----------------+---------------------------------------------------+ | | | |XATTR_DONTFOLLOW | | | | | | | Do not follow the symbolic link but operate on | | | symbolic link itself. | | | | | | | | XATTR_ROOT | | | | | | | Set attribute in root (trusted) namespace. | | | Requires root privileges. | | | | +-----------------+---------------------------------------------------+ RETURN VALUES
Returns a string containing the value or FALSE if the attribute doesn't exist. EXAMPLES
Example #1 Checks if system administrator has signed the file <?php $file = '/usr/local/sbin/some_binary'; $signature = xattr_get($file, 'Root signature', XATTR_ROOT); /* ... check if $signature is valid ... */ ?> SEE ALSO
xattr_list(3), xattr_set(3), xattr_remove(3). PHP Documentation Group XATTR_GET(3)

Check Out this Related Man Page

XATTR_LIST(3)								 1							     XATTR_LIST(3)

xattr_list - Get a list of extended attributes

SYNOPSIS
array xattr_list (string $filename, [int $flags]) DESCRIPTION
This functions gets a list of names of extended attributes of a file. Extended attributes have two different namespaces: user and root. The user namespace is available to all users, while the root namespace is available only to users with root privileges. xattr operates on the user namespace by default, but this can be changed with the $flags parameter. PARAMETERS
o $filename - The path of the file. o $flags - Supported xattr flags +-----------------+---------------------------------------------------+ | | | |XATTR_DONTFOLLOW | | | | | | | Do not follow the symbolic link but operate on | | | symbolic link itself. | | | | | | | | XATTR_ROOT | | | | | | | Set attribute in root (trusted) namespace. | | | Requires root privileges. | | | | +-----------------+---------------------------------------------------+ RETURN VALUES
This function returns an array with names of extended attributes. EXAMPLES
Example #1 Prints names of all extended attributes of file <?php $file = 'some_file'; $root_attributes = xattr_list($file, XATTR_ROOT); $user_attributes = xattr_list($file); echo "Root attributes: "; foreach ($root_attributes as $attr_name) { printf("%s ", $attr_name); } echo " User attributes: "; foreach ($attributes as $attr_name) { printf("%s ", $attr_name); } ?> SEE ALSO
xattr_get(3). PHP Documentation Group XATTR_LIST(3)
Man Page

9 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. Red Hat

How can l create a user that as all the Attribute & Privilages of root

Hi, Is it possible to create a user in Linux 8.0 with all the attribute and the privilages of super user (root). Without using root as the logg in name. Thanx (6 Replies)
Discussion started by: kayode
6 Replies

3. HP-UX

Disabled/Locked users

How can I check the disabled/locked users in HP-UX? It's possible to know that without root privileges? Thanks. (2 Replies)
Discussion started by: psimoes79
2 Replies

4. AIX

Privileges User ((Please urgent))

Hi ,,, I create new user on AIX 5.2 but the user have privileges root user Why the user have privileges root user although the user specification not the same specification root user ??? PLease help me ... (6 Replies)
Discussion started by: AIX122
6 Replies

5. UNIX for Dummies Questions & Answers

root privileges

Hello, As admin with root rights, to execute any command from another user without password-ask, I do : su - <user> -c "<cmd>" But how can I do to give the same rights to another physical user without using root user ? :confused: I've try to create another user "toor" with the same primary... (4 Replies)
Discussion started by: madmat
4 Replies

6. Linux

Root user doest not exist

Hi All, I changed the root user home directory to /home/root for some testing purpose, afterwards the logged user name its showing "I have no name" instead of root and also when we want to su to root its giving root user doesnot exist, so I tried to add the root user then its giving root user... (3 Replies)
Discussion started by: sasidarvarma
3 Replies

7. AIX

Root user

Hello everyone I have a question ? Its possible to create another user exactly as root? If not its possible what options I have to create a user like root. Thanks for your comments. Greetings (5 Replies)
Discussion started by: lo-lp-kl
5 Replies

8. UNIX for Dummies Questions & Answers

tracking root users

Hi everyone hope you can help me i have 5 root users and the problem with that is how can you see witch root user did what on the box how can you track the users that played on the servers. 1) What commands they typed (in linux you get history ) 2) From witch ip did they connect to the server (3 Replies)
Discussion started by: sucram
3 Replies

9. UNIX for Advanced & Expert Users

View CrobJobs used by all users

Hi I am using UNIX . I do not have root acces . How do i check different users cronjobs .Is there any command to check using mutiple users in one shot With user : AAA i can get all cronjob using crontab -l AAA similarly with user BBB i can get all cron entries . For that i need to login as... (5 Replies)
Discussion started by: Perlbaby
5 Replies