Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
4,724 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
3,712 |
Shell Programming and Scripting |
|
|
|
18 |
3,450 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
17,243 |
Shell Programming and Scripting |
|
|
|
12 |
4,194 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
7,941 |
Cybersecurity |
|
|
|
6 |
9,693 |
Shell Programming and Scripting |
|
|
|
1 |
1,789 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,696 |
Shell Programming and Scripting |
|
|
|
4 |
2,291 |
Shell Programming and Scripting |
|
|
|
2 |
40,012 |
Shell Programming and Scripting |
|
|
|
5 |
6,557 |
Shell Programming and Scripting |
|
|
|
2 |
6,783 |
Shell Programming and Scripting |
|
|
|
11 |
5,523 |
Shell Programming and Scripting |
|
|
|
6 |
331,534 |
Tips and Tutorials |
|
|
|
3 |
19,452 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,639 |
Web Development |
|
|
|
3 |
7,406 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,933 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,951 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
6,177 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,520 |
SuSE |
|
|
|
3 |
9,462 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,736 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,698 |
Shell Programming and Scripting |
|
|
|
1 |
7,384 |
Shell Programming and Scripting |
|
|
|
2 |
4,012 |
HP-UX |
|
|
|
1 |
4,367 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,420 |
Shell Programming and Scripting |
|
|
|
3 |
17,725 |
Solaris |
|
|
|
3 |
13,025 |
Solaris |
|
|
|
1 |
11,277 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,161 |
Shell Programming and Scripting |
|
|
|
2 |
10,914 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,844 |
Shell Programming and Scripting |
|
|
|
33 |
56,867 |
Shell Programming and Scripting |
|
|
|
5 |
13,438 |
Shell Programming and Scripting |
|
|
|
3 |
15,128 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,635 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
10,253 |
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)