Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
3,177 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
3,368 |
Shell Programming and Scripting |
|
|
|
18 |
3,102 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
16,097 |
Shell Programming and Scripting |
|
|
|
12 |
3,872 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
7,115 |
Cybersecurity |
|
|
|
6 |
9,248 |
Shell Programming and Scripting |
|
|
|
1 |
1,505 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
9,968 |
Shell Programming and Scripting |
|
|
|
4 |
2,035 |
Shell Programming and Scripting |
|
|
|
2 |
39,242 |
Shell Programming and Scripting |
|
|
|
5 |
6,182 |
Shell Programming and Scripting |
|
|
|
2 |
6,386 |
Shell Programming and Scripting |
|
|
|
11 |
5,091 |
Shell Programming and Scripting |
|
|
|
6 |
324,753 |
Tips and Tutorials |
|
|
|
3 |
18,924 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,351 |
Web Development |
|
|
|
3 |
7,047 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,294 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,631 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,949 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,373 |
SuSE |
|
|
|
3 |
9,192 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,523 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,567 |
Shell Programming and Scripting |
|
|
|
1 |
7,134 |
Shell Programming and Scripting |
|
|
|
2 |
3,801 |
HP-UX |
|
|
|
1 |
4,319 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,212 |
Shell Programming and Scripting |
|
|
|
3 |
17,465 |
Solaris |
|
|
|
3 |
12,797 |
Solaris |
|
|
|
1 |
11,021 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,985 |
Shell Programming and Scripting |
|
|
|
2 |
10,712 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,763 |
Shell Programming and Scripting |
|
|
|
33 |
56,177 |
Shell Programming and Scripting |
|
|
|
5 |
13,251 |
Shell Programming and Scripting |
|
|
|
3 |
14,888 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,491 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,691 |
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)