0

TL;DR

In Report → Status, I’ve the following error:

Writable (public download method) The directory /var/priv_fls does not exist. You may need to set the correct directory at the file system settings page or change the current directory's permissions so that it is writable.

How can I solve this error?

Full Story

In my webhosting at Forpsi, I’ve got FTP access to folder, in which there is www folder (let’s call this folder web_root). I’ve installed Drupal 8 in web_root/www. Then, I’ve added to web_root I’ve created a folder called priv_fls—for private files—and chmod’ed its permissions to 777 (I know it’s not secure). In web_root/www/sites/default/settings.php the following line: $settings['file_private_path'] = '/var/priv_fls'; and Cleared all caches (in Drupal). Then the error above appeared.

It might be that it is not /var/priv_fls from Drupal’s point of view, but even tried to change it /priv_fls in settings.php, but the error remained.

Update

I emphesise that web_root is only a substitution for the ‘root’ folder to which my webhosting provider (Forpsi) gives me access. If I login to the server using FTP, this web_root folder lists the following files:

/> ls
drwxr-xr-x    9 66573      users            4096 Sep  5 20:10 .
drwxr-xr-x    9 66573      users            4096 Sep  5 20:10 ..
-rw-rw----    1 66573      users               7 Sep  1 02:39 .ftpquota
dr-xr-xr-x    2 0          0                4096 Jul 15 22:01 backups-forpsi
drwxr-xr-x    2 66573      users            4096 Sep 23  2010 data
drwxrwxrwx    2 66573      users            4096 Sep  5 20:10 priv_fls
drwxr-xr-x    3 66573      users            4096 Sep  1 12:54 softaculous
drwxr-xr-x    2 66573      users            4096 Sep 23  2010 stat
drwxr-xr-x    2 66573      users            4096 Sep 23  2010 tmp
drwxr-xr-x   10 66573      users            4096 Sep  4 19:40 www

But I can’t get the absolute path (pwd gives me ftp://user@server.com:/>; ls .. gives me same output as ls; both of which are useless from the point of getting the absolute path).

Anyways, Drupal is installed on shared webserver.

closed as off-topic by Kevin, mradcliffe, Shawn Conn, leymannx, Neograph734 Sep 12 '18 at 20:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – mradcliffe, leymannx, Neograph734
If this question can be reworded to fit the rules in the help center, please edit the question.

  • It might be that it is not /var/priv_fls from Drupal’s point of view Given that you created the folder under a folder called web_root, it can't be that from any point of view. That's a full (not relative) system path, so it'll need to be /path/to/web_root/priv_fls – Clive Sep 6 '18 at 12:54
  • Well, I have no idea how to get the absolute path (see the update in the question). – tukusejssirs Sep 6 '18 at 16:49
  • This is probably a question best suited for Forpsi support, but it's possible there's a Stack Exchange or Stack Overflow user who might know the answer. – mradcliffe Sep 6 '18 at 21:50
0

TL;DR

web_root = /web/htdocs4/username/home/, where username is (at least in my case) my ftp login (they use the following convension: for domain example.com the username is examplecom)

Full Story

I’ve just accidently found out what is the absolute path of the web_root.

I installed TCPDF module and enabled both TCPDF and TCPDF Example. The latter created a link TCPDF example in the second (right) sidebar, and when clicked that link, it showed me the following error:

Fatal error: Class 'TCPDF' not found in /web/htdocs4/username/home/www/modules/tcpdf/src/TCPDFDrupal.php on line 16

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