ApiBuilder

Create robust API with your models

Back to ApiBuilder Support

ennio.porro
ennio.porro

I've successfully installed the plugin. When i try to create a new API it says that it can't create api.xaml:

Error saving file 'plugins/creativepartnership/gengiscan/api.xaml'. Please check write permissions.

But the permissions in the whole October directory are ok:

ls -al plugins/creativepartnership/gengiscan/ total 36 drwxr-xr-x 7 www-data www-data 4096 Aug 12 16:35 . drwxr-xr-x 3 www-data www-data 4096 Aug 12 15:40 .. drwxr-xr-x 2 www-data www-data 4096 Aug 12 15:40 classes drwxr-xr-x 3 www-data www-data 4096 Aug 14 09:24 controllers drwxr-xr-x 3 www-data www-data 4096 Aug 12 15:40 lang drwxr-xr-x 3 www-data www-data 4096 Aug 13 00:33 models -rw-r--r-- 1 www-data www-data 221 Aug 12 15:40 Plugin.php -rw-r--r-- 1 www-data www-data 219 Aug 12 15:40 plugin.yaml drwxr-xr-x 2 www-data www-data 4096 Aug 12 16:28 updates

Obviously, the web server user is www-data and there is enough disk space. Am i missing something? Thanks in advance.

emmanuel.makgabo14416
emmanuel.makgabo14416

Hi, I have the same permissions as you and I have no issues creating files. Can you confirm that the web server is using www-data user?

emmanuel.makgabo14416
emmanuel.makgabo14416

Hi, I've managed to reproduce your error. Error saving api.xaml This is definitely permissions issue. You need to make sure that www-data has write permissions on plugins/creativepartnership/gengiscan folder.

ennio.porro
ennio.porro

Hi Emmanuel, thanks for your replies. The web server is running with the www-data user:

root 1932 0.0 1.2 579228 11956 ? Ss Jul28 1:01 /usr/sbin/apache2 -k start www-data 13816 0.0 17.2 697484 167984 ? S 06:25 0:04 /usr/sbin/apache2 -k start www-data 13862 0.0 9.7 669116 95448 ? S 06:26 0:03 /usr/sbin/apache2 -k start www-data 13863 0.0 12.1 679212 118564 ? S 06:26 0:03 /usr/sbin/apache2 -k start www-data 23493 0.0 9.7 675800 95272 ? S 12:22 0:00 /usr/sbin/apache2 -k start www-data 23494 0.0 10.3 679088 100928 ? S 12:22 0:01 /usr/sbin/apache2 -k start www-data 23524 0.0 10.0 602544 98596 ? S 12:23 0:01 /usr/sbin/apache2 -k start www-data 23746 0.0 10.2 676792 99736 ? S 12:41 0:00 /usr/sbin/apache2 -k start www-data 23747 0.0 7.8 603536 76904 ? S 12:41 0:00 /usr/sbin/apache2 -k start www-data 23748 0.0 9.1 678104 89056 ? S 12:41 0:00 /usr/sbin/apache2 -k start www-data 24433 0.0 7.6 597340 74400 ? S 13:48 0:00 /usr/sbin/apache2 -k start

Also, all the directories are the right permissions:

ls -al plugins/

total 36 drwxr-xr-x 9 www-data www-data 4096 Aug 17 12:49 . drwxr-xr-x 10 www-data www-data 4096 Aug 12 10:02 .. drwxr-xr-x 3 www-data www-data 4096 Aug 12 15:40 creativepartnership

ls -al plugins/creativepartnership/

total 12 drwxr-xr-x 3 www-data www-data 4096 Aug 12 15:40 . drwxr-xr-x 9 www-data www-data 4096 Aug 17 12:49 .. drwxr-xr-x 7 www-data www-data 4096 Aug 12 16:35 gengiscan

ls -al plugins/creativepartnership/gengiscan/

total 36 drwxr-xr-x 7 www-data www-data 4096 Aug 12 16:35 . drwxr-xr-x 3 www-data www-data 4096 Aug 12 15:40 .. drwxr-xr-x 2 www-data www-data 4096 Aug 12 15:40 classes drwxr-xr-x 3 www-data www-data 4096 Aug 14 09:24 controllers drwxr-xr-x 3 www-data www-data 4096 Aug 12 15:40 lang drwxr-xr-x 3 www-data www-data 4096 Aug 13 00:33 models -rw-r--r-- 1 www-data www-data 221 Aug 12 15:40 Plugin.php -rw-r--r-- 1 www-data www-data 219 Aug 12 15:40 plugin.yaml drwxr-xr-x 2 www-data www-data 4096 Aug 12 16:28 updates

I already checked it seems to be all ok. Any other ideas? Thanks in advance.

1-4 of 4