Hi,
the docs not really helpful about creation or edit exist package.
I found that to create new package we have to use ‘v-add-user-package’.
When i try to send parameters true api like ‘v_package’, ‘v_bandwidth’ and etc…
I’m getting error: Usage: v-add-user-package PKG_DIR PACKAGE
The example you have provided is the same of what i am doing.
I have changed the “returncode” to yes.
I am using admin user and password to make all the api calls and all working fine beside this.
If I use:
i also tried to run from ssh and this is what i get:
v-add-user-package /home/admin/tmp/ testdfgdsfds
/usr/local/hestia/func/main.sh: line 1533: /usr/local/hestia/conf/hestia.conf: Permission denied
/home/admin/tmp/ does not exists
testdfgdsfds is the file name of testdfgdsfds.pkg that located in tmp folder that i have created from ssh just for testing.
admin@server:~$ v-add-user-package /tmp/pack.pkg "testt"
/usr/local/hestia/func/main.sh: line 1533: /usr/local/hestia/conf/hestia.conf: Permission denied
/tmp/pack.pkg does not exists
ok i make some test and upload the pack.pkg to root folder of admin user.
now when i run: admin@server:~$ v-add-user-package pack.pkg testt
i get another error related with Permission.
/usr/local/hestia/func/main.sh: line 1533: /usr/local/hestia/conf/hestia.conf: Permission denied
grep: /usr/local/hestia/conf/hestia.conf: Permission denied
cp: cannot create regular file '/usr/local/hestia/data/packages/testt.pkg': Permission denied
chmod: cannot access '/usr/local/hestia/data/packages/testt.pkg': No such file or directory
/usr/local/hestia/func/main.sh: line 1533: /usr/local/hestia/conf/hestia.conf: Permission denied
touch: cannot touch '/usr/local/hestia/data/users/admin/system.log': Permission denied
grep: /usr/local/hestia/data/users/admin/system.log: Permission denied
/usr/local/hestia/func/main.sh: line 145: /usr/local/hestia/data/users/admin/system.log: Permission denied
/usr/local/hestia/func/main.sh: line 98: /usr/local/hestia/log/system.log: Permission denied
Now the cli worked but seems that there is some Permission problem that makes this now working in any way…
I have created pack file true the ssh using root user.
Then i run true ssh the cli comand v-add-user-package and all worked fine.
But this not the way this should work.
From what i see and i did so many tests, there is some Permission problem.
i will try to do more tests with some new server provider, but i don’t think that this is some server problem.