Closed squillace closed 6 years ago
Can you show the output of ls -al /home/ralph | grep draft
for me?
drwxr-xr-x 6 root root 4096 Mar 22 18:02 .draft
-rw-rw-r-- 1 ralph ralph 13607255 Mar 22 16:54 draft-canary-linux-amd64.tar.gz
-rw-rw-r-- 1 ralph ralph 12373698 Mar 8 17:57 draft-v0.10.1-linux-amd64.tar.gz
I can torch the Mar 8 version....?
aha! Yes you can, but I think I found the root of your issue.
Your $DRAFT_HOME directory was created with root permissions, perhaps by running sudo draft init
the first time.
First, let's get you running again, and then figure out next steps to handle this better.
Can you try the following:
sudo chown ralph:ralph /home/ralph/.draft
That should reset the user/group permissions in $DRAFT_HOME back to the expected user permissions. once that's done, you should be able to run all draft
commands without requiring sudo.
Now, as for the fix, it looks like when sudo draft init
is called, we are still assuming that $HOME is /home/ralph instead of /root (the default home of the root user). We should identify and fix up that particular issue.
you did in fact find it. resolved also #612 and #613 as well.
ubuntu 16.04, draft rc2 based on https://github.com/Azure/draft/commit/b66329c163c67dc8c7f9a3560573f0c9d42ce560 isn't able to write logs to /home//.draft/logs/: permission denied. Looks like this:
and with sudo: