Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: pulgoki on September 09, 2024, 01:34:10 PM

Title: {$boarddir} <-- what is this directory?
Post by: pulgoki on September 09, 2024, 01:34:10 PM
Sorry if this is an ignorant question.  Can you guys tell me what this directory is and if it's important.  It has what appears to be no permissions set and it's causing my backups to complain.  Can this be removed? Or permissions changed so it can be backed up?
Title: Re: {$boarddir} <-- what is this directory?
Post by: Arantor on September 09, 2024, 01:37:02 PM
$boarddir is the variable that points to where all the SMF files live. If your forum lives on the server in /usr/username/public_html, that's what $boarddir should contain. So, uh, yeah, kinda important.

It should be set inside Settings.php.
Title: Re: {$boarddir} <-- what is this directory?
Post by: Sir Osis of Liver on September 09, 2024, 01:38:05 PM
It's a variable, not a board, unless you've created a board with that name.  Logging an error?
Title: Re: {$boarddir} <-- what is this directory?
Post by: pulgoki on September 09, 2024, 01:43:02 PM
Quote from: Sir Osis of Liver on September 09, 2024, 01:38:05 PMLogging an error?

Yea.. since it appears to have no permissions set, it isn't able to be read by the backup. 

d---------  2 ********* ********    4096 Dec 28  2021 '{$boarddir}'
Title: Re: {$boarddir} <-- what is this directory?
Post by: Aleksi "Lex" Kilpinen on September 09, 2024, 01:45:34 PM
It also shouldn't exist. It is not supposed to be an actual directory.
Title: Re: {$boarddir} <-- what is this directory?
Post by: pulgoki on September 09, 2024, 01:48:42 PM
Quote from: Aleksi "Lex" Kilpinen on September 09, 2024, 01:45:34 PMIt also shouldn't exist. It is not supposed to be an actual directory.

I moved my forum from one host to another a few months back. I wonder if it somehow got created during that move?

Is it safe to remove that directory?
Title: Re: {$boarddir} <-- what is this directory?
Post by: Aleksi "Lex" Kilpinen on September 09, 2024, 01:51:01 PM
Is there anything in it? I mean, on a vanilla install sure, it would be safe to just remove - but since it shouldn't even exist to begin with, I'd be curious to know what created it to be able to perhaps guess what is going to break when you delete it.
Title: Re: {$boarddir} <-- what is this directory?
Post by: pulgoki on September 09, 2024, 01:53:07 PM
It wont let me access it from a terminal but I *think* I am able to from the hosts file manager. When I change in to it, it appears to be empty.
Title: Re: {$boarddir} <-- what is this directory?
Post by: Sir Osis of Liver on September 09, 2024, 01:53:16 PM
It's a valid directory name.  If you actually have a /$boarddir directory it should be empty and you can delete it.
Title: Re: {$boarddir} <-- what is this directory?
Post by: pulgoki on September 09, 2024, 02:04:35 PM
lol. yea.  It is actually  /{$boarddir}

I don't know why it's surrounded by brackets or why it even exists.

The variable is set correctly in Settings.php
Title: Re: {$boarddir} <-- what is this directory?
Post by: Arantor on September 09, 2024, 02:13:56 PM
There are several places in SMF where {$boarddir} is used as a placeholder for substituting in the real value. That seems like something made the folder when it meant to fix the placeholder first, and somehow failed to do so.
Title: Re: {$boarddir} <-- what is this directory?
Post by: pulgoki on September 09, 2024, 02:24:52 PM
I'm a little too nervous to delete it at this point. I changed the permissions so it wouldn't error out during the backup and that seemed to have worked.

I'm going to keep my eye on it and see if the permissions change back at some point. If they do I'll know that I have a different issue going on.

If I don't notice anything strange I'll remove it in a few weeks and see if anything breaks.   
Title: Re: {$boarddir} <-- what is this directory?
Post by: Steve on September 09, 2024, 03:32:32 PM
Why not make a copy of your settings.PHP and search for {$boarddir} inside it? If it is in there, then why not download {$boarddir} to your computer and hold on to it and delete it from your forum and make sure everything works?
Title: Re: {$boarddir} <-- what is this directory?
Post by: Sir Osis of Liver on September 09, 2024, 08:59:21 PM
Did you install the forum with a host installer?