How to script "files_external:create"?

Hello all !!

I have successfully created external SFTP access through the admin panel. It works very well. My concern is that I would like to script this creation of external access with an occ command but I can’t:/

I found a documentation owncloud, I managed to export my current access with the command “files_external:export” so I have the necessary variables but it is impossible to find the correct syntax. This is the command I send :

php occ files_external:create \ 
"\/Test" "SFTP" \
" password::password" \
--config host=test-xxxx.net \
--config password=password \
--config root=/media \
--config user=testsftp \
--user C4rter

But whatever the syntax I use, I always get the error message :

Too many arguments to “files_external:create” command, expected arguments " mount_point" “storage_backend” “authentication_backend”

Can you help me please ?

No idea to help me ?

Still no feedback on my question ?

Hi,

Did you try without quoting SFTP and password::password (there is a white space) ?

Works for me:

./occ files_external:create “/Test” sftp password::password --config host=test-xxxx.net --config password=password --config root=/media --config user=testsftp --user C4rter

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.