0
Answered

Mobile app error on API 403 permission

Ron C 9 months ago • updated 9 months ago 4

We have all setup and wanted to move to the mobile app. All userrights are perfect and we can login and upload and download just fine via web. As soon as we switch to the Mobile app We receive the error 403. "You dont have permission to access /api.php/files/upload on this server". We use php 5.6 latest version and all works fine via Web. We can creeate folders in the mobile app by the way. Just not upload files


Error in the Logs of apache:

client denied by server configuration: /home/webdoc/domains/domein.nl/private_html/api.php


Answer

Answer
Answered

The solution was to configure the server to allow HTTP PUT requests.

Under review

The server administrator should be able to troubleshoot this for you. Most probably the web server's configuration does not allow URLs such as "/api.php/files/upload". You can easily confirm this if you try to access FileRun via "http://your-site.com/filerun/index.php/test". You should get the same result as with our demo: http://demo.filerun.co/index.php/test

Hi Vlad,


I get the same output as yours.
http://demo.filerun.co/index.php/test
and
http://www.webdoc.nl/index.php/test
Our systemadministrator finds that the client is denied by server config. Is there a way you can can help him.

Answer
Answered

The solution was to configure the server to allow HTTP PUT requests.

Perfect Vlad. All works fine now. Just added the PUT in the server section. In my case:


Open "/etc/httpd/conf/httpd.conf" and look for:


<Directory /home/*>

AllowOverride All

Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes

<Limit GET POST OPTIONS PROPFIND>

Order allow,deny

Allow from all

</Limit>

<LimitExcept GET POST OPTIONS PROPFIND>

Order deny,allow

Deny from all

</LimitExcept>

</Directory>


Then just add PUT (and maybe DELETE if you want) after PROPFIND. Restart httpd by "/sbin/service httpd restart" and voila