Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
2,272 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
2,770 |
Shell Programming and Scripting |
|
|
|
18 |
2,680 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
14,694 |
Shell Programming and Scripting |
|
|
|
12 |
3,483 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
5,941 |
Cybersecurity |
|
|
|
6 |
8,831 |
Shell Programming and Scripting |
|
|
|
1 |
1,243 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
9,362 |
Shell Programming and Scripting |
|
|
|
4 |
1,845 |
Shell Programming and Scripting |
|
|
|
2 |
38,380 |
Shell Programming and Scripting |
|
|
|
5 |
5,725 |
Shell Programming and Scripting |
|
|
|
2 |
6,008 |
Shell Programming and Scripting |
|
|
|
11 |
4,719 |
Shell Programming and Scripting |
|
|
|
6 |
315,204 |
Tips and Tutorials |
|
|
|
3 |
18,404 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,109 |
Web Development |
|
|
|
3 |
6,806 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,790 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,391 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,743 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,191 |
SuSE |
|
|
|
3 |
8,825 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,327 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,447 |
Shell Programming and Scripting |
|
|
|
1 |
6,841 |
Shell Programming and Scripting |
|
|
|
2 |
3,628 |
HP-UX |
|
|
|
1 |
4,198 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,905 |
Shell Programming and Scripting |
|
|
|
3 |
17,100 |
Solaris |
|
|
|
3 |
12,563 |
Solaris |
|
|
|
1 |
10,795 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,841 |
Shell Programming and Scripting |
|
|
|
2 |
10,493 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,636 |
Shell Programming and Scripting |
|
|
|
33 |
55,036 |
Shell Programming and Scripting |
|
|
|
5 |
13,044 |
Shell Programming and Scripting |
|
|
|
3 |
14,719 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,286 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,202 |
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)