Description

This function displays a file's permissions.

Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$view_permissions = $cpanel->api1('Fileman', 'showperm', array('public_html', 'myfile')); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $view_permissions = $cpliveapi->api1('Fileman', 'showperm' ['public_html', 'myfile']); # Call the function.


<cpanel Module="Fileman::showperm ( $FORM('dir','file'))">




cpapi1 --user=username Fileman showperm public_html myfile



<tr>
 <td><b>Mode</b></td>
 <td>User</td><td>Group</td>
 <td>World</td>
 </tr>
 <tr>
 <td>Read</td>
 <td><input checked="checked" type="checkbox" name="ur" value="4" onClick="calcperm();"></td>
 <td><input checked="checked" type="checkbox" name="gr" value="4" onClick="calcperm();"></td>
 <td><input checked="checked" type="checkbox" name="wr" value="4" onClick="calcperm();"></td>
 </tr>
 <tr>
 <td>Write</td>
 <td><input checked="checked" type="checkbox" name="uw" value="2" onClick="calcperm();"></td>
 <td><input type="checkbox" name="gw" value="2" onClick="calcperm();"></td>
 <td><input type="checkbox" name="ww" value="2" onClick="calcperm();"></td>
 </tr>
 <tr>
 <td>Execute</td>
 <td><input type="checkbox" name="ux" value="1" onClick="calcperm();"></td>
 <td><input type="checkbox" name="gx" value="1" onClick="calcperm();"></td>
 <td><input type="checkbox" name="wx" value="1" onClick="calcperm();"></td>
 </tr>
 <tr>
 <td>Permission</td>
 <td><input type="text" name="u" size="1" readonly="readonly"></td>
 <td><input type="text" name="g" size="1" readonly="readonly"></td>
 <td><input type="text" name="w" size="1" readonly="readonly"></td>
 </tr>






Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

Required

The file's directory.

Any valid directory name.public_html
filestring

Required

The file.

Any valid filenamemyfile

Returns

This function returns HTML to display the file's permissions.