Unix and Linux Discussions Tagged with chmod |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
3,492 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
3,424 |
Shell Programming and Scripting |
|
|
|
18 |
3,157 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
16,422 |
Shell Programming and Scripting |
|
|
|
12 |
3,920 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
7,398 |
Cybersecurity |
|
|
|
6 |
9,313 |
Shell Programming and Scripting |
|
|
|
1 |
1,536 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,066 |
Shell Programming and Scripting |
|
|
|
4 |
2,058 |
Shell Programming and Scripting |
|
|
|
2 |
39,345 |
Shell Programming and Scripting |
|
|
|
5 |
6,246 |
Shell Programming and Scripting |
|
|
|
2 |
6,452 |
Shell Programming and Scripting |
|
|
|
11 |
5,148 |
Shell Programming and Scripting |
|
|
|
6 |
325,164 |
Tips and Tutorials |
|
|
|
3 |
18,980 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,385 |
Web Development |
|
|
|
3 |
7,089 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,364 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
4,674 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,956 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
10,390 |
SuSE |
|
|
|
3 |
9,263 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,544 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,583 |
Shell Programming and Scripting |
|
|
|
1 |
7,169 |
Shell Programming and Scripting |
|
|
|
2 |
3,835 |
HP-UX |
|
|
|
1 |
4,331 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,238 |
Shell Programming and Scripting |
|
|
|
3 |
17,491 |
Solaris |
|
|
|
3 |
12,841 |
Solaris |
|
|
|
1 |
11,051 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
9,007 |
Shell Programming and Scripting |
|
|
|
2 |
10,739 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,779 |
Shell Programming and Scripting |
|
|
|
33 |
56,287 |
Shell Programming and Scripting |
|
|
|
5 |
13,277 |
Shell Programming and Scripting |
|
|
|
3 |
14,920 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
7,520 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
9,805 |
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)