-su: /var/lib/one/.one/one_auth: Permission denied

When I run the command “echo “oneadmin:mypassword” > ~/.one/one_auth” as oneadmin as shown below:

oneadmin@neha-HP-Compaq-8100-Elite-CMT-PC:~$ echo “oneadmin:mypassword” > ~/.one/one_auth

I encountered this error “-su: /var/lib/one/.one/one_auth: Permission denied”. Please anyone shed some light on the reason behind and suggest possible solutions.

su doesn’t like redirections. You could try this instead: echo "oneadmin:mypassword" | tee /var/lib/one/.one/one_auth (add -a to tee so that instead of overwriting the file, it adds the line)

Please do not open multiple threads about the same issue.This is the fourth thread about the same problem:

https://forum.opennebula.io/t/one-auth-file-is-not-present?source_topic_id=4764 https://forum.opennebula.io/t/cat-var-lib-one-one-one-auth-permission-denied?source_topic_id=4764 https://forum.opennebula.io/t/one-auth-file-is-not-present-in-opennebula?source_topic_id=4764

OK.

Please do not open multiple threads about the same issue.This is the
fourth thread about the same problem:

https://forum.opennebula.io/t/one-auth-file-is-not-present

https://forum.opennebula.io/t/cat-var-lib-one-one-one-auth-permission-denied

https://forum.opennebula.io/t/one-auth-file-is-not-present-in-opennebula


Visit
Topic

or reply to this email to respond.

To unsubscribe from these emails, click
here
.

Again got the same error as

tee: /var/lib/one/.one/one_auth: Permission denied

What are the permissions of that file?

ls -al /var/lib/one/.one/one_auth
lsattr /var/lib/one/.one/one_auth

Cannot access these commands.

@Mathieu : there is a redundant discussion going on at https://forum.opennebula.io/t/one-auth-file-is-not-present-in-opennebula - there is more information there - let’s move to that thread and abandon this one.