Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
2,852 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
3,242 |
Shell Programming and Scripting |
|
|
|
18 |
2,981 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
15,674 |
Shell Programming and Scripting |
|
|
|
12 |
3,756 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,785 |
Cybersecurity |
|
|
|
6 |
9,104 |
Shell Programming and Scripting |
|
|
|
1 |
1,461 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
9,768 |
Shell Programming and Scripting |
|
|
|
4 |
1,966 |
Shell Programming and Scripting |
|
|
|
2 |
38,978 |
Shell Programming and Scripting |
|
|
|
5 |
6,030 |
Shell Programming and Scripting |
|
|
|
2 |
6,256 |
Shell Programming and Scripting |
|
|
|
11 |
4,969 |
Shell Programming and Scripting |
|
|
|
6 |
323,133 |
Tips and Tutorials |
|
|
|
3 |
18,770 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,262 |
Web Development |
|
|
|
3 |
6,972 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,131 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,565 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,917 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,315 |
SuSE |
|
|
|
3 |
9,065 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,468 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,527 |
Shell Programming and Scripting |
|
|
|
1 |
7,049 |
Shell Programming and Scripting |
|
|
|
2 |
3,744 |
HP-UX |
|
|
|
1 |
4,275 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,119 |
Shell Programming and Scripting |
|
|
|
3 |
17,380 |
Solaris |
|
|
|
3 |
12,714 |
Solaris |
|
|
|
1 |
10,944 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,939 |
Shell Programming and Scripting |
|
|
|
2 |
10,642 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,727 |
Shell Programming and Scripting |
|
|
|
33 |
55,955 |
Shell Programming and Scripting |
|
|
|
5 |
13,193 |
Shell Programming and Scripting |
|
|
|
3 |
14,825 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,413 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,498 |
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)