Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
2,800 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
3,211 |
Shell Programming and Scripting |
|
|
|
18 |
2,938 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
15,591 |
Shell Programming and Scripting |
|
|
|
12 |
3,730 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,742 |
Cybersecurity |
|
|
|
6 |
9,080 |
Shell Programming and Scripting |
|
|
|
1 |
1,439 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
9,741 |
Shell Programming and Scripting |
|
|
|
4 |
1,954 |
Shell Programming and Scripting |
|
|
|
2 |
38,945 |
Shell Programming and Scripting |
|
|
|
5 |
6,009 |
Shell Programming and Scripting |
|
|
|
2 |
6,235 |
Shell Programming and Scripting |
|
|
|
11 |
4,949 |
Shell Programming and Scripting |
|
|
|
6 |
322,885 |
Tips and Tutorials |
|
|
|
3 |
18,748 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,243 |
Web Development |
|
|
|
3 |
6,953 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,107 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,545 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,905 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,296 |
SuSE |
|
|
|
3 |
9,041 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,453 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,517 |
Shell Programming and Scripting |
|
|
|
1 |
7,036 |
Shell Programming and Scripting |
|
|
|
2 |
3,730 |
HP-UX |
|
|
|
1 |
4,267 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,103 |
Shell Programming and Scripting |
|
|
|
3 |
17,365 |
Solaris |
|
|
|
3 |
12,698 |
Solaris |
|
|
|
1 |
10,934 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,928 |
Shell Programming and Scripting |
|
|
|
2 |
10,627 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,719 |
Shell Programming and Scripting |
|
|
|
33 |
55,898 |
Shell Programming and Scripting |
|
|
|
5 |
13,180 |
Shell Programming and Scripting |
|
|
|
3 |
14,812 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,396 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,479 |
Cybersecurity |
PHARFILEINFO.CHMOD(3) 1 PHARFILEINFO.CHMOD(3)
PharFileInfo::chmod - Sets file-specific permission bits
SYNOPSIS
public void PharFileInfo::chmod (int $permissions)
DESCRIPTION
PharFileInfo.chmod(3) allows setting of the executable file permissions bit, as well as read-only bits. Writeable bits are ignored, and set
at runtime based on the phar.readonly INI variable. As with all functionality that modifies the contents of a phar, the phar.readonly INI
variable must be off in order to succeed if the file is within a Phar archive. Files within PharData archives do not have this restriction.
PARAMETERS
o $permissions
- permissions (see chmod(3))
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
A PharFileInfo.chmod(3) example
<?php
// make sure it doesn't exist
@unlink('brandnewphar.phar');
try {
$p = new Phar('brandnewphar.phar', 0, 'brandnewphar.phar');
$p['file.sh'] = '#!/usr/local/lib/php
<?php echo "hi"; ?>';
// set executable bit
$p['file.sh']->chmod(0555);
var_dump($p['file.sh']->isExecutable());
} catch (Exception $e) {
echo 'Could not create/modify phar: ', $e;
}
?>
The above example will output:
bool(true)
PHP Documentation Group PHARFILEINFO.CHMOD(3)