Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
2,571 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
2,997 |
Shell Programming and Scripting |
|
|
|
18 |
2,848 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
15,274 |
Shell Programming and Scripting |
|
|
|
12 |
3,635 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,371 |
Cybersecurity |
|
|
|
6 |
8,977 |
Shell Programming and Scripting |
|
|
|
1 |
1,341 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
9,599 |
Shell Programming and Scripting |
|
|
|
4 |
1,908 |
Shell Programming and Scripting |
|
|
|
2 |
38,761 |
Shell Programming and Scripting |
|
|
|
5 |
5,894 |
Shell Programming and Scripting |
|
|
|
2 |
6,158 |
Shell Programming and Scripting |
|
|
|
11 |
4,868 |
Shell Programming and Scripting |
|
|
|
6 |
320,238 |
Tips and Tutorials |
|
|
|
3 |
18,651 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,207 |
Web Development |
|
|
|
3 |
6,891 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,006 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,504 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,838 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,257 |
SuSE |
|
|
|
3 |
8,958 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,412 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,497 |
Shell Programming and Scripting |
|
|
|
1 |
6,968 |
Shell Programming and Scripting |
|
|
|
2 |
3,699 |
HP-UX |
|
|
|
1 |
4,244 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,026 |
Shell Programming and Scripting |
|
|
|
3 |
17,288 |
Solaris |
|
|
|
3 |
12,647 |
Solaris |
|
|
|
1 |
10,883 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,901 |
Shell Programming and Scripting |
|
|
|
2 |
10,596 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,694 |
Shell Programming and Scripting |
|
|
|
33 |
55,520 |
Shell Programming and Scripting |
|
|
|
5 |
13,149 |
Shell Programming and Scripting |
|
|
|
3 |
14,775 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,352 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,378 |
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)