Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up bash completion for occ #6

Open
nkakouros opened this issue Feb 7, 2018 · 4 comments
Open

Set up bash completion for occ #6

nkakouros opened this issue Feb 7, 2018 · 4 comments
Assignees

Comments

@nkakouros
Copy link
Collaborator

No description provided.

@nkakouros nkakouros self-assigned this Feb 7, 2018
@simonspa
Copy link
Contributor

This is something I can't even get to work manually. I guess the culprit is that www-data needs to have a profile, as noted in the docs:

Command autocompletion currently only works if the user you use to execute the occ commands has a profile. www-data in most cases is nologon and therefor cannot use this feature.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#enabling-autocompletion

I'd be very hesitant to change that user account...

@nkakouros
Copy link
Collaborator Author

What we could do is:

  • create a /usr/bin/occ symlink to the occ script
  • create an /etc/profile.d/occ.sh script that contains the lines that setup autocompletion from the nextcloud docs

Then, if the user wants to work with the occ tool, they can do:

sudo su www-data -l -s /bin/bash

And they will have autocompletion. We could mention this in the README.

@simonspa
Copy link
Contributor

sudo su www-data -l -s /bin/bash

<- that's exactly the problem - www-data is a user without profile, so we cannot su into it because it can never open a terminal session:

# sudo su www-data
This account is currently not available.

@nkakouros
Copy link
Collaborator Author

nkakouros commented Nov 19, 2019

If you supply -s /bin/bash then it will use a shell for the www-data user to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants