you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (11 children)

Well if you go the 'reddit' user route, you'd need to reinstall TheLounge. On comments here, you can indent with 4 spaces if you want to make it monospaced code style.

Anway.... lets do

$ sudo chown -R chatuser:chatuser /home/chatuser/.lounge

And then try to start TheLounge again, then give me the output. You could also delete /home/chatuser/.lounge and /home/chatuser/lounge-autoconnect and start over and be careful not to run anything as root.

[–]portcity[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (10 children)

Ok I did everything all over again, installing The Lounge in user: reddit, and I got the exact same permission denied problem (see the results of ls -la in this pastebin: https://pastebin.com/3efUw36U The only thing I haven't done is I haven't updated the certificate so that the Lounge certificate is the same as the Unrealircd cerfificate (because I've been following the instructions to the letter and the instructions say to use the certificate with the word "snakeoil" in it.

I also installed Node and curl on user:reddit.

I'm also not totally sure how to remove installed packages? I know about rm -rf but that didn't seem to work on removing the lounge from chatuser. Like maybe I don't know the exact paths?

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (9 children)

try:

$ cd ~/lounge-autoconnect
$ touch thelounge.log

Aka make sure thelounge.log exists and isn't owned by root.

With removing TheLounge, it wasn't really installed like a proper unix app, so to removing it is just this afaik:

$ sudo rm -rf /home/chatuser/.lounge
$ sudo rm -rf /home/chatuser/lounge-autoconnect

[–]portcity[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (8 children)

cd ~/lounge-autoconnect

reddit@redditclone:~$ cd ~/lounge-autoconnect
reddit@redditclone:~/lounge-autoconnect$ touch thelounge.log
touch: cannot touch ‘thelounge.log’: Permission denied

Ok, I used those commands above to remove the lounge from user: chatuser.

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (7 children)

touch: cannot touch ‘thelounge.log’: Permission denied

It sounds like your TheLounge folder isn't owned by you?

$ ls -la ~/lounge-autoconnect

[–]portcity[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (6 children)

ls -la ~/lounge-autoconnect

Yup: https://pastebin.com/zA0ni0EM

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (5 children)

Yeah your whole directory is owned by root. You should not be doing a sudo git clone, just a git clone, so user reddit owns it all. I'd delete it and re-do it.

[–]portcity[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (4 children)

You nailed it. I had gotten into the habit of always putting "sudo" in front of every command because I was getting a lot of "permission denied" if I didn't do that, so yes, I did put "sudo git" while installing that git clone. So I just reinstalled the lounge, and it seemed to work.

Where I'm at now: when I load https://portcity.online, it works ... but when I load the "unsafe scripts" it breaks the SSL and reverts back to http ... that loads the box on the right (which I think is the IRC client?) but it's blank and it says "reddit.local's IP address could not be found." I am positive I edited /etc/hosts to have my VPS IP point to reddit.local

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (3 children)

You should have zero "reddit.local" on your server. No need to add it to the hosts file or try to route requests using it.

You'll need to change a bunch of chat config to not use reddit.local instead. Anywhere you see reddit.local put portcity.online instead.

[–]portcity[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

Ok, I'll do that but first ... did you see how I broke the UI while working on the rest of the admin config? I'm not sure but I think it was while I was working on this section: Set the default subs $ cd ~/src/reddit/r2 $ paster shell run.ini # paste the following, hit enter: from r2.models import * srs = [Subreddit._by_name(n) for n in ("pics", "videos", "science", "technology")] LocalizedDefaultSubreddits.set_global_srs(srs) LocalizedFeaturedSubreddits.set_global_srs([Subreddit._by_name('pics')]) exit()

Here's a pastebin of the section of the github I was working on when the UI broke: https://pastebin.com/CEe7hjHi

[–]portcity[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (1 child)

This is what I found when I ran grep reddit.local

reddit@redditclone:~$ sudo grep -r "reddit.local" /etc/
[sudo] password for reddit: 
/etc/letsencrypt/accounts/acme- v02.api.letsencrypt.org/directory/df4b3d506c0d55f36baa0507c6f684f8/meta.json:{"creation_host": "reddit.local", "creation_dt": "2019-07-18T01:30:22Z"}
/etc/mtab:reddit@reddit.local:/home/reddit/src/reddit 
/home/reddit/vm fuse.sshfs rw,nosuid,nodev,user=reddit 0 0