Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
2,533 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
2,974 |
Shell Programming and Scripting |
|
|
|
18 |
2,825 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
15,206 |
Shell Programming and Scripting |
|
|
|
12 |
3,620 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,309 |
Cybersecurity |
|
|
|
6 |
8,961 |
Shell Programming and Scripting |
|
|
|
1 |
1,329 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
9,577 |
Shell Programming and Scripting |
|
|
|
4 |
1,899 |
Shell Programming and Scripting |
|
|
|
2 |
38,734 |
Shell Programming and Scripting |
|
|
|
5 |
5,873 |
Shell Programming and Scripting |
|
|
|
2 |
6,139 |
Shell Programming and Scripting |
|
|
|
11 |
4,849 |
Shell Programming and Scripting |
|
|
|
6 |
320,091 |
Tips and Tutorials |
|
|
|
3 |
18,638 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,197 |
Web Development |
|
|
|
3 |
6,876 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,978 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,489 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,804 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,250 |
SuSE |
|
|
|
3 |
8,944 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,398 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,492 |
Shell Programming and Scripting |
|
|
|
1 |
6,953 |
Shell Programming and Scripting |
|
|
|
2 |
3,695 |
HP-UX |
|
|
|
1 |
4,240 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,013 |
Shell Programming and Scripting |
|
|
|
3 |
17,281 |
Solaris |
|
|
|
3 |
12,639 |
Solaris |
|
|
|
1 |
10,873 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
8,893 |
Shell Programming and Scripting |
|
|
|
2 |
10,587 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,690 |
Shell Programming and Scripting |
|
|
|
33 |
55,486 |
Shell Programming and Scripting |
|
|
|
5 |
13,140 |
Shell Programming and Scripting |
|
|
|
3 |
14,769 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,339 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,365 |
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)