0

Environment: Shared hosting, Apache.

Home directory: /home/someuser

Website at: /home/someuser/public_html/stuff

I've spent 2 days trying to get this to work, and realise that as soon as I'm answered it will be blindingly obvious, but I'm failing miserably right now.

I have created a directory in my public_html directory called private_files with a sub-directory called stuff. Both have access rights 755.

I have edited settings.php to include the line:

# $settings['file_private_path'] 
= '/home/someuser/public_html/private_files/stuff';

I have cleared all caches.

The file system configuration page shows:

Private file system path

Not set

What stunningly stupid mistake am I making? Why is what I'm doing wrong?

  • 2
    Is that the line in settings.php verbatim, or have you removed the comment char (#)? – Clive Aug 21 '18 at 13:27
  • @Clive I told you it would be blindingly stupid -- after 2 days of trying I'd pretty well gone gaga (and I rarely do anything with PHP anyway -- it's all monkey see monkey do something stupid). If you want to construct an answer pointing out my idiot mistake, I'll accept it -- somebody else might fall into the same idiot trap. – ColeValleyGirl Aug 21 '18 at 13:40
  • Don't beat yourself up over it. Every programmer ever has been through similar things. It's a right of passage. That's what makes the community so great - we can all look stupid to each other, and since we've all done it, we're all ok! – Jaypan Aug 21 '18 at 21:52
0

In order for this question to be marked as answered, @Clive pointed out here that the problem was the leading # character, which made the 1st line a comment, meaning that the file_private_path was never set.

The correct line should be

$settings['file_private_path'] = '/home/someuser/public_html/private_files/stuff';
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.