Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason why you are not able to execute ls is because of permissions.</p> <p>If you are running the web server as <strong>user A</strong> , then you can only <strong>ls</strong> only those directories which have permissions for <strong>user A</strong>.</p> <p>You can either change the permission of the directory or you can change the user under which the server is running by changing the <strong>httpd.conf</strong> file(i am assuming that you are using apache).</p> <p>If you are changing the permissions of the directory, then make sure that you change permissions of parent directories also.</p> <p>To change the web server user, follow following steps:</p> <p>Open the following file:</p> <pre><code>vi /etc/httpd/conf/httpd.conf </code></pre> <p>Search for </p> <pre><code>User apache Group apache </code></pre> <p>Change the user and group name. After changing the user and group, restart the server using following command.</p> <pre><code>/sbin/service httpd restart </code></pre> <p>Then you will be able to execute all commands which can be run by that user.</p> <p>EDIT:</p> <p>The 'User' should be a non-root user in httpd.conf. Apache by default doesnot serve pages when run as root. You have to set user as a non-root user or else you will get error. If you want to force apache to run as root, then you have to set a environment variable as below:</p> <pre><code>env CFLAGS=-DBIG_SECURITY_HOLE </code></pre> <p>Then you have to rebuild apache before you can run it as root.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload