Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
3,151 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
3,361 |
Shell Programming and Scripting |
|
|
|
18 |
3,098 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
16,078 |
Shell Programming and Scripting |
|
|
|
12 |
3,866 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
7,091 |
Cybersecurity |
|
|
|
6 |
9,239 |
Shell Programming and Scripting |
|
|
|
1 |
1,505 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
9,959 |
Shell Programming and Scripting |
|
|
|
4 |
2,032 |
Shell Programming and Scripting |
|
|
|
2 |
39,230 |
Shell Programming and Scripting |
|
|
|
5 |
6,177 |
Shell Programming and Scripting |
|
|
|
2 |
6,380 |
Shell Programming and Scripting |
|
|
|
11 |
5,084 |
Shell Programming and Scripting |
|
|
|
6 |
324,703 |
Tips and Tutorials |
|
|
|
3 |
18,915 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,346 |
Web Development |
|
|
|
3 |
7,044 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,286 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,628 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,948 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,370 |
SuSE |
|
|
|
3 |
9,184 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,522 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,565 |
Shell Programming and Scripting |
|
|
|
1 |
7,131 |
Shell Programming and Scripting |
|
|
|
2 |
3,797 |
HP-UX |
|
|
|
1 |
4,316 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,206 |
Shell Programming and Scripting |
|
|
|
3 |
17,457 |
Solaris |
|
|
|
3 |
12,791 |
Solaris |
|
|
|
1 |
11,018 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,982 |
Shell Programming and Scripting |
|
|
|
2 |
10,709 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,761 |
Shell Programming and Scripting |
|
|
|
33 |
56,159 |
Shell Programming and Scripting |
|
|
|
5 |
13,248 |
Shell Programming and Scripting |
|
|
|
3 |
14,884 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,489 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,686 |
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)